aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/LTO/LTOModule.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/LTO/LTOModule.cpp b/llvm/lib/LTO/LTOModule.cpp
index bdf3ed5..961c759 100644
--- a/llvm/lib/LTO/LTOModule.cpp
+++ b/llvm/lib/LTO/LTOModule.cpp
@@ -70,7 +70,8 @@ bool LTOModule::isBitcodeFile(const char *path) {
bool LTOModule::isBitcodeForTarget(MemoryBuffer *buffer,
StringRef triplePrefix) {
- return getBitcodeTargetTriple(buffer, getGlobalContext()) == triplePrefix;
+ std::string Triple = getBitcodeTargetTriple(buffer, getGlobalContext());
+ return StringRef(Triple).startswith(triplePrefix);
}
LTOModule *LTOModule::createFromFile(const char *path, TargetOptions options,