llvm-capstone/libc/config/public_api.td
Siva Chandra Reddy 9b8ca3c1f1 [libc] Add global stdout and stderr objects.
They are added as entrypoint object targets. The header-gen
infrastructure has been extended to enable handling standard required
global objects. The libc-api-test has also been extended to verify the
global object declarations.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D126329
2022-05-27 05:43:49 +00:00

27 lines
691 B
TableGen

include "spec/spec.td"
class MacroDef<string name> {
string Name = name;
string Defn = "";
}
class SimpleMacroDef<string name, string value> : MacroDef<name> {
let Defn = !strconcat("#define ", name, " ", value);
}
class MacroDefineIfNot<string name, string value> : MacroDef<name> {
let Defn = !strconcat("#ifndef ", name, "\n",
"#define " , name, " ", value, "\n",
"#endif // ", name);
}
class PublicAPI<string name> {
string HeaderName = name;
list<MacroDef> Macros = [];
list<string> Types = [];
list<string> Enumerations = [];
list<string> Structs = [];
list<string> Functions = [];
list<string> Objects = [];
}