diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-02-16 21:58:21 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-02-16 21:58:21 +0000 |
commit | b1152d842c6599e41581302a85a0f53928253add (patch) | |
tree | 914c0ca178ba4ac606b2f787dd2c3ee8b8c76a20 /lib/AST/Builtins.cpp | |
parent | f81895f963f0910c7df422709f7f1668eb9f7c4f (diff) |
Supply the header corresponding to a library builtin as a separate argument to the LIBBUILTIN macro
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64676 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Builtins.cpp')
-rw-r--r-- | lib/AST/Builtins.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/lib/AST/Builtins.cpp b/lib/AST/Builtins.cpp index 4a8a338e63..e4a79e4a38 100644 --- a/lib/AST/Builtins.cpp +++ b/lib/AST/Builtins.cpp @@ -19,8 +19,9 @@ using namespace clang; static const Builtin::Info BuiltinInfo[] = { - { "not a builtin function", 0, 0, false }, -#define BUILTIN(ID, TYPE, ATTRS) { #ID, TYPE, ATTRS, false }, + { "not a builtin function", 0, 0, 0, false }, +#define BUILTIN(ID, TYPE, ATTRS) { #ID, TYPE, ATTRS, 0, false }, +#define LIBBUILTIN(ID, TYPE, ATTRS, HEADER) { #ID, TYPE, ATTRS, HEADER, false }, #include "clang/AST/Builtins.def" }; @@ -57,21 +58,6 @@ void Builtin::Context::InitializeBuiltins(IdentifierTable &Table, Table.get(TSRecords[i].Name).setBuiltinID(i+Builtin::FirstTSBuiltin); } -std::string Builtin::Context::getHeaderName(unsigned ID) const { - const char *Name = strchr(GetRecord(ID).Attributes, 'f'); - if (!Name) - return 0; - ++Name; - - if (*Name != ':') - return 0; - - ++Name; - const char *NameEnd = strchr(Name, ':'); - assert(NameEnd && "Missing ':' after header name"); - return std::string(Name, NameEnd); -} - bool Builtin::Context::isPrintfLike(unsigned ID, unsigned &FormatIdx, bool &HasVAListArg) { |