diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-10-11 19:04:24 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-10-11 19:04:24 +0000 |
commit | 4e291ad04928930cbf181b25a229011f4d810fb1 (patch) | |
tree | 0cadd26275b9c32556179d14b26ccc008bdc113a /include/clang/Basic/Builtins.h | |
parent | 475ec9b9c263e7e95694609db150de916e178827 (diff) |
Revert "Change Builtins name to be stored as StringRef instead of raw pointers (NFC)"
This reverts commit r283802. It introduces temporarily static
initializers, because StringRef ctor isn't (yet) constexpr for
string literals.
I plan to get there this week, but apparently GCC is so terrible
with these static initializer right now (10 min+ extra codegen
time was reported) that I'll hold on to this patch till the
constexpr one is ready, and land these at the same time.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283920 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/Builtins.h')
-rw-r--r-- | include/clang/Basic/Builtins.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/clang/Basic/Builtins.h b/include/clang/Basic/Builtins.h index e765ddd5fd..87c1f93eed 100644 --- a/include/clang/Basic/Builtins.h +++ b/include/clang/Basic/Builtins.h @@ -51,8 +51,7 @@ enum ID { }; struct Info { - llvm::StringRef Name; - const char *Type, *Attributes, *HeaderName; + const char *Name, *Type, *Attributes, *HeaderName; LanguageID Langs; const char *Features; }; @@ -81,7 +80,7 @@ public: /// \brief Return the identifier name for the specified builtin, /// e.g. "__builtin_abs". - llvm::StringRef getName(unsigned ID) const { + const char *getName(unsigned ID) const { return getRecord(ID).Name; } |