summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-02-16 21:58:21 +0000
committerDouglas Gregor <dgregor@apple.com>2009-02-16 21:58:21 +0000
commit9eebd9709ab0a47855526f0847370ab65c96217b (patch)
treef8751239eae4aa589f21c4b9d87714b21b804d02 /clang/lib/AST
parent210c26f8d3b394af9650cb5d72ef0916fd2e2fe4 (diff)
downloadbcm5719-llvm-9eebd9709ab0a47855526f0847370ab65c96217b.tar.gz
bcm5719-llvm-9eebd9709ab0a47855526f0847370ab65c96217b.zip
Supply the header corresponding to a library builtin as a separate argument to the LIBBUILTIN macro
llvm-svn: 64676
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/Builtins.cpp20
1 files changed, 3 insertions, 17 deletions
diff --git a/clang/lib/AST/Builtins.cpp b/clang/lib/AST/Builtins.cpp
index 4a8a338e637..e4a79e4a380 100644
--- a/clang/lib/AST/Builtins.cpp
+++ b/clang/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) {
OpenPOWER on IntegriCloud