diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2017-04-14 02:55:06 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2017-04-14 02:55:06 +0000 |
commit | a9b9e013db83ae7d51bd7de4934a2ea246bab445 (patch) | |
tree | 90a75c88048a56d5cc5e176a4687d1753582a3c5 /lib/LTO/LTO.cpp | |
parent | c432779417b48cfb0f578c5e3d2ecbb6cd235fcb (diff) |
Object, LTO: Add target triple to irsymtab and LTO API.
Start using it in LLD to avoid needing to read bitcode again just to get the
target triple, and in llvm-lto2 to avoid printing symbol table information
that is inappropriate for the target.
Differential Revision: https://reviews.llvm.org/D32038
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300300 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/LTO/LTO.cpp')
-rw-r--r-- | lib/LTO/LTO.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/LTO/LTO.cpp b/lib/LTO/LTO.cpp index e6fc8cc8853..9782c898bf5 100644 --- a/lib/LTO/LTO.cpp +++ b/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(); |