Revert "Convert a few std::strings to StringRef."
This reverts commit r212342.
We can get a StringRef into the current Record, but not one in the bitcode
itself since the string is compressed in it.
llvm-svn: 212356
diff --git a/llvm/lib/LTO/LTOModule.cpp b/llvm/lib/LTO/LTOModule.cpp
index 2fa450f..5b3057177 100644
--- a/llvm/lib/LTO/LTOModule.cpp
+++ b/llvm/lib/LTO/LTOModule.cpp
@@ -63,8 +63,8 @@
bool LTOModule::isBitcodeForTarget(MemoryBuffer *buffer,
StringRef triplePrefix) {
- StringRef Triple = getBitcodeTargetTriple(buffer, getGlobalContext());
- return Triple.startswith(triplePrefix);
+ std::string Triple = getBitcodeTargetTriple(buffer, getGlobalContext());
+ return StringRef(Triple).startswith(triplePrefix);
}
LTOModule *LTOModule::createFromFile(const char *path, TargetOptions options,