Index: lldb/source/Symbol/TypeSystem.cpp =================================================================== --- lldb/source/Symbol/TypeSystem.cpp +++ lldb/source/Symbol/TypeSystem.cpp @@ -219,7 +219,7 @@ } error = llvm::make_error( "TypeSystem for language " + - llvm::toStringRef(Language::GetNameForLanguageType(language)) + + llvm::StringRef(Language::GetNameForLanguageType(language)) + " doesn't exist", llvm::inconvertibleErrorCode()); return std::move(error); @@ -236,7 +236,7 @@ } error = llvm::make_error( "TypeSystem for language " + - llvm::toStringRef(Language::GetNameForLanguageType(language)) + + llvm::StringRef(Language::GetNameForLanguageType(language)) + " doesn't exist", llvm::inconvertibleErrorCode()); return std::move(error); @@ -246,7 +246,7 @@ if (!can_create) { error = llvm::make_error( "Unable to find type system for language " + - llvm::toStringRef(Language::GetNameForLanguageType(language)), + llvm::StringRef(Language::GetNameForLanguageType(language)), llvm::inconvertibleErrorCode()); } else { // Cache even if we get a shared pointer that contains a null type system @@ -259,7 +259,7 @@ } error = llvm::make_error( "TypeSystem for language " + - llvm::toStringRef(Language::GetNameForLanguageType(language)) + + llvm::StringRef(Language::GetNameForLanguageType(language)) + " doesn't exist", llvm::inconvertibleErrorCode()); } @@ -288,7 +288,7 @@ } error = llvm::make_error( "TypeSystem for language " + - llvm::toStringRef(Language::GetNameForLanguageType(language)) + + llvm::StringRef(Language::GetNameForLanguageType(language)) + " doesn't exist", llvm::inconvertibleErrorCode()); return std::move(error); @@ -305,7 +305,7 @@ } error = llvm::make_error( "TypeSystem for language " + - llvm::toStringRef(Language::GetNameForLanguageType(language)) + + llvm::StringRef(Language::GetNameForLanguageType(language)) + " doesn't exist", llvm::inconvertibleErrorCode()); return std::move(error); @@ -315,7 +315,7 @@ if (!can_create) { error = llvm::make_error( "Unable to find type system for language " + - llvm::toStringRef(Language::GetNameForLanguageType(language)), + llvm::StringRef(Language::GetNameForLanguageType(language)), llvm::inconvertibleErrorCode()); } else { // Cache even if we get a shared pointer that contains a null type system @@ -328,7 +328,7 @@ } error = llvm::make_error( "TypeSystem for language " + - llvm::toStringRef(Language::GetNameForLanguageType(language)) + + llvm::StringRef(Language::GetNameForLanguageType(language)) + " doesn't exist", llvm::inconvertibleErrorCode()); } Index: llvm/include/llvm/ADT/StringExtras.h =================================================================== --- llvm/include/llvm/ADT/StringExtras.h +++ llvm/include/llvm/ADT/StringExtras.h @@ -49,7 +49,11 @@ } /// Construct a string ref from a boolean. -inline StringRef toStringRef(bool B) { return StringRef(B ? "true" : "false"); } +template +typename std::enable_if::value, StringRef>::type +toStringRef(T B) { + return StringRef(B ? "true" : "false"); +} /// Construct a string ref from an array ref of unsigned chars. inline StringRef toStringRef(ArrayRef Input) { Index: llvm/include/llvm/CodeGen/CommandFlags.inc =================================================================== --- llvm/include/llvm/CodeGen/CommandFlags.inc +++ llvm/include/llvm/CodeGen/CommandFlags.inc @@ -389,7 +389,7 @@ } if (DisableTailCalls.getNumOccurrences() > 0) NewAttrs.addAttribute("disable-tail-calls", - toStringRef(DisableTailCalls)); + toStringRef((bool)DisableTailCalls)); if (StackRealign) NewAttrs.addAttribute("stackrealign");