diff options
| author | Alp Toker <alp@nuanti.com> | 2014-07-04 02:01:54 +0000 |
|---|---|---|
| committer | Alp Toker <alp@nuanti.com> | 2014-07-04 02:01:54 +0000 |
| commit | be53eebe5a2cc1c20c20c5cbc4a60b858f0fa33e (patch) | |
| tree | a19ce08d358ca078f012da2706ba92f5e8c072f7 /llvm/lib | |
| parent | c1058df66f15589012f5e2dc1ab571906778e8cc (diff) | |
| download | llvm-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.cpp | 3 |
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, |
