diff options
| -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); |

