summaryrefslogtreecommitdiffstats
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
parent940d19a09c40dd26656102da2115718794ddcf07 (diff)
downloadbcm5719-llvm-412c802bda34d925bce0d557db6cf715ca012936.tar.gz
bcm5719-llvm-412c802bda34d925bce0d557db6cf715ca012936.zip
Move BitcodeCompiler constructor to the .cpp file. NFC.
llvm-svn: 267221
-rw-r--r--lld/ELF/LTO.cpp6
-rw-r--r--lld/ELF/LTO.h7
2 files changed, 7 insertions, 6 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));
diff --git a/lld/ELF/LTO.h b/lld/ELF/LTO.h
index 1bc67d7a9c1..6d404bcdc9d 100644
--- a/lld/ELF/LTO.h
+++ b/lld/ELF/LTO.h
@@ -37,15 +37,10 @@ class InputFile;
class BitcodeCompiler {
public:
+ BitcodeCompiler();
void add(BitcodeFile &F);
std::vector<std::unique_ptr<InputFile>> compile();
- BitcodeCompiler()
- : Combined(new llvm::Module("ld-temp.o", Context)), Mover(*Combined) {
- Context.setDiscardValueNames(Config->DiscardValueNames);
- Context.enableDebugTypeODRUniquing();
- }
-
private:
std::vector<std::unique_ptr<InputFile>> runSplitCodegen(
const std::function<std::unique_ptr<llvm::TargetMachine>()> &TMFactory);
OpenPOWER on IntegriCloud