[lld] r267221 - Move BitcodeCompiler constructor to the .cpp file. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 22 14:16:18 PDT 2016
Author: ruiu
Date: Fri Apr 22 16:16:18 2016
New Revision: 267221
URL: http://llvm.org/viewvc/llvm-project?rev=267221&view=rev
Log:
Move BitcodeCompiler constructor to the .cpp file. NFC.
Modified:
lld/trunk/ELF/LTO.cpp
lld/trunk/ELF/LTO.h
Modified: lld/trunk/ELF/LTO.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LTO.cpp?rev=267221&r1=267220&r2=267221&view=diff
==============================================================================
--- lld/trunk/ELF/LTO.cpp (original)
+++ lld/trunk/ELF/LTO.cpp Fri Apr 22 16:16:18 2016
@@ -85,6 +85,12 @@ static bool shouldInternalize(const Smal
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));
Modified: lld/trunk/ELF/LTO.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LTO.h?rev=267221&r1=267220&r2=267221&view=diff
==============================================================================
--- lld/trunk/ELF/LTO.h (original)
+++ lld/trunk/ELF/LTO.h Fri Apr 22 16:16:18 2016
@@ -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);
More information about the llvm-commits
mailing list