]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/analyzer/known-function-manager.h
testsuite: Fix missing EFFECTIVE_TARGETS variable errors
[thirdparty/gcc.git] / gcc / analyzer / known-function-manager.h
CommitLineData
07e30160
DM
1/* Support for plugin-supplied behaviors of known functions.
2 Copyright (C) 2022 Free Software Foundation, Inc.
3 Contributed by David Malcolm <dmalcolm@redhat.com>.
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it
8under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 3, or (at your option)
10any later version.
11
12GCC is distributed in the hope that it will be useful, but
13WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GCC; see the file COPYING3. If not see
19<http://www.gnu.org/licenses/>. */
20
21#ifndef GCC_ANALYZER_KNOWN_FUNCTION_MANAGER_H
22#define GCC_ANALYZER_KNOWN_FUNCTION_MANAGER_H
23
bfca9505
DM
24#include "analyzer/analyzer-logging.h"
25
07e30160
DM
26namespace ana {
27
28class known_function_manager : public log_user
29{
30public:
31 known_function_manager (logger *logger);
32 ~known_function_manager ();
76dd2c4f 33 void add (const char *name, std::unique_ptr<known_function> kf);
07e30160
DM
34 const known_function *get_by_identifier (tree identifier);
35 const known_function *get_by_fndecl (tree fndecl);
36
37private:
38 DISABLE_COPY_AND_ASSIGN (known_function_manager);
39
40 /* Map from identifier to known_function instance.
41 Has ownership of the latter. */
42 hash_map<tree, known_function *> m_map_id_to_kf;
43};
44
45} // namespace ana
46
47#endif /* GCC_ANALYZER_KNOWN_FUNCTION_MANAGER_H */