14
14
15
15
#include " ansi_c_language.h"
16
16
17
- struct cprover_library_entryt
18
- {
19
- const char *function;
20
- const char *model;
21
- } cprover_library[]=
22
- #include " cprover_library.inc"
23
- ; // NOLINT(whitespace/semicolon)
24
-
25
- std::string get_cprover_library_text (
17
+ static std::string get_cprover_library_text (
26
18
const std::set<irep_idt> &functions,
27
19
const symbol_tablet &symbol_table)
28
20
{
@@ -35,10 +27,29 @@ std::string get_cprover_library_text(
35
27
if (config.ansi_c .string_abstraction )
36
28
library_text << " #define __CPROVER_STRING_ABSTRACTION\n " ;
37
29
30
+ // cprover_library.inc may not have been generated when running Doxygen, thus
31
+ // make Doxygen skip this part
32
+ // / \cond
33
+ const struct cprover_library_entryt cprover_library[] =
34
+ #include " cprover_library.inc"
35
+ ; // NOLINT(whitespace/semicolon)
36
+ // / \endcond
37
+
38
+ return get_cprover_library_text (
39
+ functions, symbol_table, cprover_library, library_text.str ());
40
+ }
41
+
42
+ std::string get_cprover_library_text (
43
+ const std::set<irep_idt> &functions,
44
+ const symbol_tablet &symbol_table,
45
+ const struct cprover_library_entryt cprover_library[],
46
+ const std::string &prologue)
47
+ {
48
+ std::ostringstream library_text (prologue);
49
+
38
50
std::size_t count=0 ;
39
51
40
- for (cprover_library_entryt *e=cprover_library;
41
- e->function !=nullptr ;
52
+ for (const cprover_library_entryt *e = cprover_library; e->function != nullptr ;
42
53
e++)
43
54
{
44
55
irep_idt id=e->function ;
@@ -63,7 +74,7 @@ std::string get_cprover_library_text(
63
74
return library_text.str ();
64
75
}
65
76
66
- void add_cprover_library (
77
+ void cprover_c_library_factory (
67
78
const std::set<irep_idt> &functions,
68
79
symbol_tablet &symbol_table,
69
80
message_handlert &message_handler)
0 commit comments