llvm.org GIT mirror llvm / ae8f1f3
Remove unused members and constructor arguments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181096 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 6 years ago
3 changed file(s) with 9 addition(s) and 20 deletion(s). Raw diff Collapse all Expand all
4646 /// Construct the Linker with an empty module which will be given the
4747 /// name \p progname. \p progname will also be used for error messages.
4848 /// @brief Construct with empty module
49 Linker(StringRef progname, ///< name of tool running linker
50 StringRef modulename, ///< name of linker's end-result module
51 LLVMContext &C, ///< Context for global info
52 unsigned Flags = 0 ///< ControlFlags (one or more |'d together)
49 Linker(StringRef modulename, ///< name of linker's end-result module
50 LLVMContext &C ///< Context for global info
5351 );
5452
5553 /// Construct the Linker with a previously defined module, \p aModule. Use
5654 /// \p progname for the name of the program in error messages.
5755 /// @brief Construct with existing module
58 Linker(StringRef progname, Module* aModule, unsigned Flags = 0);
56 Linker(Module* aModule);
5957
6058 /// Destruct the Linker.
6159 /// @brief Destructor
114112 private:
115113 LLVMContext& Context; ///< The context for global information
116114 Module* Composite; ///< The composite module linked together
117 unsigned Flags; ///< Flags to control optional behavior.
118 std::string Error; ///< Text of error that occurred.
119 std::string ProgramName; ///< Name of the program being linked
120115 /// @}
121116
122117 };
1818 #include "llvm/Support/system_error.h"
1919 using namespace llvm;
2020
21 Linker::Linker(StringRef progname, StringRef modname,
22 LLVMContext& C, unsigned flags):
21 Linker::Linker(StringRef modname,
22 LLVMContext& C):
2323 Context(C),
24 Composite(new Module(modname, C)),
25 Flags(flags),
26 Error(),
27 ProgramName(progname) { }
24 Composite(new Module(modname, C)) { }
2825
29 Linker::Linker(StringRef progname, Module* aModule, unsigned flags) :
26 Linker::Linker(Module* aModule) :
3027 Context(aModule->getContext()),
31 Composite(aModule),
32 Flags(flags),
33 Error(),
34 ProgramName(progname) { }
28 Composite(aModule) { }
3529
3630 Linker::~Linker() {
3731 delete Composite;
6868
6969 LTOCodeGenerator::LTOCodeGenerator()
7070 : _context(getGlobalContext()),
71 _linker("LinkTimeOptimizer", "ld-temp.o", _context), _target(NULL),
71 _linker("ld-temp.o", _context), _target(NULL),
7272 _emitDwarfDebugInfo(false), _scopeRestrictionsDone(false),
7373 _codeModel(LTO_CODEGEN_PIC_MODEL_DYNAMIC),
7474 _nativeObjectFile(NULL) {