diff options
| author | Rui Ueyama <ruiu@google.com> | 2016-04-22 21:16:18 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2016-04-22 21:16:18 +0000 |
| commit | 412c802bda34d925bce0d557db6cf715ca012936 (patch) | |
| tree | 7dd55fe0f7ebc02d69be05ac2a55fe30d403df5b | |
| parent | 940d19a09c40dd26656102da2115718794ddcf07 (diff) | |
| download | bcm5719-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.cpp | 6 | ||||
| -rw-r--r-- | lld/ELF/LTO.h | 7 |
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); |

