summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO/LTOModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/LTO/LTOModule.cpp')
-rw-r--r--llvm/lib/LTO/LTOModule.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/LTO/LTOModule.cpp b/llvm/lib/LTO/LTOModule.cpp
index 2fa450fd9d9..5b3057177e2 100644
--- a/llvm/lib/LTO/LTOModule.cpp
+++ b/llvm/lib/LTO/LTOModule.cpp
@@ -63,8 +63,8 @@ bool LTOModule::isBitcodeFile(const char *path) {
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,
OpenPOWER on IntegriCloud