mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-24 22:30:13 +00:00
9b8ca3c1f1
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
27 lines
691 B
TableGen
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 = [];
|
|
}
|