aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-05-05 04:20:28 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-05-05 04:20:28 +0000
commit27a00970bf4ababdc115e54383e6252cc3276dfa (patch)
tree7cf3a0cd7845b5c8b909b047108e54f7a15b747f /lib/CodeGen/CGDebugInfo.cpp
parentab41fe914f63bb470dfa7e400876ada72f57a931 (diff)
Make BuiltinType::getName return a StringRef and introduce BuiltinType::getNameAsCString
to get a const char* if necessary. This avoids unnecessary conversions when we want to use the result of getName as a StringRef. Part of rdar://10796159 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index b3fc0a45ce..0567bf10e4 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -335,7 +335,7 @@ void CGDebugInfo::CreateCompileUnit() {
/// one if necessary.
llvm::DIType CGDebugInfo::CreateType(const BuiltinType *BT) {
unsigned Encoding = 0;
- const char *BTName = NULL;
+ StringRef BTName;
switch (BT->getKind()) {
#define BUILTIN_TYPE(Id, SingletonId)
#define PLACEHOLDER_TYPE(Id, SingletonId) \