diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/LTO/LTO.cpp | 1 | ||||
| -rw-r--r-- | llvm/lib/Object/IRSymtab.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp index e6fc8cc8853..9782c898bf5 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/lib/LTO/LTO.cpp @@ -351,6 +351,7 @@ Expected<std::unique_ptr<InputFile>> InputFile::create(MemoryBufferRef Object) { irsymtab::Reader R({Symtab.data(), Symtab.size()}, {File->Strtab.data(), File->Strtab.size()}); + File->TargetTriple = R.getTargetTriple(); File->SourceFileName = R.getSourceFileName(); File->COFFLinkerOpts = R.getCOFFLinkerOpts(); File->ComdatTable = R.getComdatTable(); diff --git a/llvm/lib/Object/IRSymtab.cpp b/llvm/lib/Object/IRSymtab.cpp index f78b84b388a..da1ef9946b5 100644 --- a/llvm/lib/Object/IRSymtab.cpp +++ b/llvm/lib/Object/IRSymtab.cpp @@ -190,6 +190,7 @@ Error Builder::build(ArrayRef<Module *> IRMods) { storage::Header Hdr; assert(!IRMods.empty()); + setStr(Hdr.TargetTriple, IRMods[0]->getTargetTriple()); setStr(Hdr.SourceFileName, IRMods[0]->getSourceFileName()); TT = Triple(IRMods[0]->getTargetTriple()); |

