]>
Commit | Line | Data |
---|---|---|
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 | ||
5 | This file is part of GCC. | |
6 | ||
7 | GCC is free software; you can redistribute it and/or modify it | |
8 | under the terms of the GNU General Public License as published by | |
9 | the Free Software Foundation; either version 3, or (at your option) | |
10 | any later version. | |
11 | ||
12 | GCC is distributed in the hope that it will be useful, but | |
13 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
18 | along 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 | ||
24 | namespace ana { | |
25 | ||
26 | class known_function_manager : public log_user | |
27 | { | |
28 | public: | |
29 | known_function_manager (logger *logger); | |
30 | ~known_function_manager (); | |
31 | void add (const char *name, known_function *kf); | |
32 | const known_function *get_by_identifier (tree identifier); | |
33 | const known_function *get_by_fndecl (tree fndecl); | |
34 | ||
35 | private: | |
36 | DISABLE_COPY_AND_ASSIGN (known_function_manager); | |
37 | ||
38 | /* Map from identifier to known_function instance. | |
39 | Has ownership of the latter. */ | |
40 | hash_map<tree, known_function *> m_map_id_to_kf; | |
41 | }; | |
42 | ||
43 | } // namespace ana | |
44 | ||
45 | #endif /* GCC_ANALYZER_KNOWN_FUNCTION_MANAGER_H */ |