diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-13 22:38:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-13 22:38:49 +0000 |
commit | c890aa2802b4beccc5dec68143b8ac448a942c30 (patch) | |
tree | 6b2ee2a32276c5cce44c8e28a429c21faf431917 /clang/lib/AST/Builtins.cpp | |
parent | dee115697b49c34b6fc00ad365f4692ab790e0f1 (diff) | |
download | bcm5719-llvm-c890aa2802b4beccc5dec68143b8ac448a942c30.tar.gz bcm5719-llvm-c890aa2802b4beccc5dec68143b8ac448a942c30.zip |
wire up a new -fno-builtin option, make it control things like simplifylibcalls,
etc and make freestanding imply it.
llvm-svn: 66972
Diffstat (limited to 'clang/lib/AST/Builtins.cpp')
-rw-r--r-- | clang/lib/AST/Builtins.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/AST/Builtins.cpp b/clang/lib/AST/Builtins.cpp index 46b0346ca46..4655cf392d7 100644 --- a/clang/lib/AST/Builtins.cpp +++ b/clang/lib/AST/Builtins.cpp @@ -38,12 +38,11 @@ const Builtin::Info &Builtin::Context::GetRecord(unsigned ID) const { /// such. void Builtin::Context::InitializeBuiltins(IdentifierTable &Table, const TargetInfo &Target, - bool Freestanding) { + bool NoBuiltins) { // Step #1: mark all target-independent builtins with their ID's. for (unsigned i = Builtin::NotBuiltin+1; i != Builtin::FirstTSBuiltin; ++i) if (!BuiltinInfo[i].Suppressed && - (!Freestanding || - !strchr(BuiltinInfo[i].Attributes, 'f'))) + (!NoBuiltins || !strchr(BuiltinInfo[i].Attributes, 'f'))) Table.get(BuiltinInfo[i].Name).setBuiltinID(i); // Step #2: Get target builtins. @@ -52,7 +51,7 @@ void Builtin::Context::InitializeBuiltins(IdentifierTable &Table, // Step #3: Register target-specific builtins. for (unsigned i = 0, e = NumTSRecords; i != e; ++i) if (!TSRecords[i].Suppressed && - (!Freestanding || + (!NoBuiltins || (TSRecords[i].Attributes && !strchr(TSRecords[i].Attributes, 'f')))) Table.get(TSRecords[i].Name).setBuiltinID(i+Builtin::FirstTSBuiltin); |