From e6b44070cf3f6004443d05ffacbfdab6c344b44b Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Fri, 4 Jul 2014 02:01:54 +0000 Subject: [PATCH] Fix prefix comparison from r212308 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212310 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/LTO/LTOModule.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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,