summaryrefslogtreecommitdiffstats
path: root/lld/ELF/LTO.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-04-22 21:16:18 +0000
committerRui Ueyama <ruiu@google.com>2016-04-22 21:16:18 +0000
commit412c802bda34d925bce0d557db6cf715ca012936 (patch)
tree7dd55fe0f7ebc02d69be05ac2a55fe30d403df5b /lld/ELF/LTO.cpp
parent940d19a09c40dd26656102da2115718794ddcf07 (diff)
downloadbcm5719-llvm-412c802bda34d925bce0d557db6cf715ca012936.tar.gz
bcm5719-llvm-412c802bda34d925bce0d557db6cf715ca012936.zip
Move BitcodeCompiler constructor to the .cpp file. NFC.
llvm-svn: 267221
Diffstat (limited to 'lld/ELF/LTO.cpp')
-rw-r--r--lld/ELF/LTO.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp
index 1c0f2f5dd7a..6924977110c 100644
--- a/lld/ELF/LTO.cpp
+++ b/lld/ELF/LTO.cpp
@@ -85,6 +85,12 @@ static bool shouldInternalize(const SmallPtrSet<GlobalValue *, 8> &Used,
return !B.Backref->includeInDynsym();
}
+BitcodeCompiler::BitcodeCompiler()
+ : Combined(new llvm::Module("ld-temp.o", Context)), Mover(*Combined) {
+ Context.setDiscardValueNames(Config->DiscardValueNames);
+ Context.enableDebugTypeODRUniquing();
+}
+
void BitcodeCompiler::add(BitcodeFile &F) {
std::unique_ptr<IRObjectFile> Obj =
check(IRObjectFile::create(F.MB, Context));
OpenPOWER on IntegriCloud