summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO/LTO.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2017-04-14 02:55:06 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2017-04-14 02:55:06 +0000
commit8446f1fe6a5afd89c0f24e5500fce675390ce87b (patch)
tree800cf0ab92411704f2b4e6b82f0ce7a799476045 /llvm/lib/LTO/LTO.cpp
parent2f72b19b05e86321b40c048ed7fdd0a9637d93d8 (diff)
downloadbcm5719-llvm-8446f1fe6a5afd89c0f24e5500fce675390ce87b.tar.gz
bcm5719-llvm-8446f1fe6a5afd89c0f24e5500fce675390ce87b.zip
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 llvm-svn: 300300
Diffstat (limited to 'llvm/lib/LTO/LTO.cpp')
-rw-r--r--llvm/lib/LTO/LTO.cpp1
1 files changed, 1 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();
OpenPOWER on IntegriCloud