diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AST/Type.cpp | 2 | ||||
-rw-r--r-- | lib/AST/TypePrinter.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 2 | ||||
-rw-r--r-- | lib/Sema/SemaCodeComplete.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index fa71ecf454..42673e8e7d 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -1425,7 +1425,7 @@ const char *Type::getTypeClassName() const { llvm_unreachable("Invalid type class."); } -const char *BuiltinType::getName(const PrintingPolicy &Policy) const { +StringRef BuiltinType::getName(const PrintingPolicy &Policy) const { switch (getKind()) { case Void: return "void"; case Bool: return Policy.Bool ? "bool" : "_Bool"; diff --git a/lib/AST/TypePrinter.cpp b/lib/AST/TypePrinter.cpp index 3bf80e7972..5ec548f3f9 100644 --- a/lib/AST/TypePrinter.cpp +++ b/lib/AST/TypePrinter.cpp @@ -210,7 +210,7 @@ void TypePrinter::printBuiltin(const BuiltinType *T, std::string &S) { } else { // Prefix the basic type, e.g. 'int X'. S = ' ' + S; - S = T->getName(Policy) + S; + S = T->getNameAsCString(Policy) + S; } } 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) \ diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp index 6536d9f522..24f536fa06 100644 --- a/lib/Sema/SemaCodeComplete.cpp +++ b/lib/Sema/SemaCodeComplete.cpp @@ -1414,7 +1414,7 @@ static const char *GetCompletionTypeString(QualType T, if (!T.getLocalQualifiers()) { // Built-in type names are constant strings. if (const BuiltinType *BT = dyn_cast<BuiltinType>(T)) - return BT->getName(Policy); + return BT->getNameAsCString(Policy); // Anonymous tag types are constant strings. if (const TagType *TagT = dyn_cast<TagType>(T)) |