diff --git a/lib/LTO/LTOModule.cpp b/lib/LTO/LTOModule.cpp index bdf3ed563d9..961c759e84c 100644 --- a/lib/LTO/LTOModule.cpp +++ b/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,