aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-07-04 02:01:54 +0000
committerAlp Toker <alp@nuanti.com>2014-07-04 02:01:54 +0000
commitbe53eebe5a2cc1c20c20c5cbc4a60b858f0fa33e (patch)
treea19ce08d358ca078f012da2706ba92f5e8c072f7 /llvm/lib
parentc1058df66f15589012f5e2dc1ab571906778e8cc (diff)
downloadllvm-be53eebe5a2cc1c20c20c5cbc4a60b858f0fa33e.zip
llvm-be53eebe5a2cc1c20c20c5cbc4a60b858f0fa33e.tar.gz
llvm-be53eebe5a2cc1c20c20c5cbc4a60b858f0fa33e.tar.bz2
Fix prefix comparison from r212308
llvm-svn: 212310
Diffstat (limited to 'llvm/lib')
-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,