From be53eebe5a2cc1c20c20c5cbc4a60b858f0fa33e 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 llvm-svn: 212310 --- llvm/lib/LTO/LTOModule.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/LTO/LTOModule.cpp b/llvm/lib/LTO/LTOModule.cpp index bdf3ed563d9c..961c759e84cf 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,