Remove unused members and constructor arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181096 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2013-05-04 02:28:57 +00:00
parent b00b4bed57
commit ae8f1f3fde
3 changed files with 9 additions and 20 deletions

View File

@ -47,16 +47,14 @@ class Linker {
/// Construct the Linker with an empty module which will be given the /// Construct the Linker with an empty module which will be given the
/// name \p progname. \p progname will also be used for error messages. /// name \p progname. \p progname will also be used for error messages.
/// @brief Construct with empty module /// @brief Construct with empty module
Linker(StringRef progname, ///< name of tool running linker Linker(StringRef modulename, ///< name of linker's end-result module
StringRef modulename, ///< name of linker's end-result module LLVMContext &C ///< Context for global info
LLVMContext &C, ///< Context for global info
unsigned Flags = 0 ///< ControlFlags (one or more |'d together)
); );
/// Construct the Linker with a previously defined module, \p aModule. Use /// Construct the Linker with a previously defined module, \p aModule. Use
/// \p progname for the name of the program in error messages. /// \p progname for the name of the program in error messages.
/// @brief Construct with existing module /// @brief Construct with existing module
Linker(StringRef progname, Module* aModule, unsigned Flags = 0); Linker(Module* aModule);
/// Destruct the Linker. /// Destruct the Linker.
/// @brief Destructor /// @brief Destructor
@ -115,9 +113,6 @@ class Linker {
private: private:
LLVMContext& Context; ///< The context for global information LLVMContext& Context; ///< The context for global information
Module* Composite; ///< The composite module linked together Module* Composite; ///< The composite module linked together
unsigned Flags; ///< Flags to control optional behavior.
std::string Error; ///< Text of error that occurred.
std::string ProgramName; ///< Name of the program being linked
/// @} /// @}
}; };

View File

@ -19,20 +19,14 @@
#include "llvm/Support/system_error.h" #include "llvm/Support/system_error.h"
using namespace llvm; using namespace llvm;
Linker::Linker(StringRef progname, StringRef modname, Linker::Linker(StringRef modname,
LLVMContext& C, unsigned flags): LLVMContext& C):
Context(C), Context(C),
Composite(new Module(modname, C)), Composite(new Module(modname, C)) { }
Flags(flags),
Error(),
ProgramName(progname) { }
Linker::Linker(StringRef progname, Module* aModule, unsigned flags) : Linker::Linker(Module* aModule) :
Context(aModule->getContext()), Context(aModule->getContext()),
Composite(aModule), Composite(aModule) { }
Flags(flags),
Error(),
ProgramName(progname) { }
Linker::~Linker() { Linker::~Linker() {
delete Composite; delete Composite;

View File

@ -69,7 +69,7 @@ const char* LTOCodeGenerator::getVersionString() {
LTOCodeGenerator::LTOCodeGenerator() LTOCodeGenerator::LTOCodeGenerator()
: _context(getGlobalContext()), : _context(getGlobalContext()),
_linker("LinkTimeOptimizer", "ld-temp.o", _context), _target(NULL), _linker("ld-temp.o", _context), _target(NULL),
_emitDwarfDebugInfo(false), _scopeRestrictionsDone(false), _emitDwarfDebugInfo(false), _scopeRestrictionsDone(false),
_codeModel(LTO_CODEGEN_PIC_MODEL_DYNAMIC), _codeModel(LTO_CODEGEN_PIC_MODEL_DYNAMIC),
_nativeObjectFile(NULL) { _nativeObjectFile(NULL) {