Fix prefix comparison from r212308

llvm-svn: 212310
This commit is contained in:
Alp Toker 2014-07-04 02:01:54 +00:00
parent c1058df66f
commit be53eebe5a
1 changed files with 2 additions and 1 deletions

View File

@ -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,