diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-05 04:20:28 +0000 | 
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-05 04:20:28 +0000 | 
| commit | bbff3da6225e16ca40b894c503ceea4644b3baf0 (patch) | |
| tree | a3cc11cb6b2d5e9eb5ff315ac8f5a502bcd8c5ec /clang/lib/CodeGen | |
| parent | de9e92ed9b96ebe2769cd7d3e02af6ae2a5d9a40 (diff) | |
| download | bcm5719-llvm-bbff3da6225e16ca40b894c503ceea4644b3baf0.tar.gz bcm5719-llvm-bbff3da6225e16ca40b894c503ceea4644b3baf0.zip | |
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
llvm-svn: 156227
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index b3fc0a45cef..0567bf10e43 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/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) \ | 

