aboutsummaryrefslogtreecommitdiff
path: root/tools/lto/LTOModule.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-11-04 09:30:19 +0000
committerBill Wendling <isanbard@gmail.com>2011-11-04 09:30:19 +0000
commita7280fd61933f1268f69045cfbea46edb739726d (patch)
tree43ad372a3dad95408a90459ed4468c72f6d91173 /tools/lto/LTOModule.h
parentb9bff969e96a24da18d6c5d0d623a7d790d41fa2 (diff)
Make the Mangler an ivar so that it doesn't have to be passed around everywhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143689 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto/LTOModule.h')
-rw-r--r--tools/lto/LTOModule.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/tools/lto/LTOModule.h b/tools/lto/LTOModule.h
index 63e5e37109..c5f83ee302 100644
--- a/tools/lto/LTOModule.h
+++ b/tools/lto/LTOModule.h
@@ -16,6 +16,7 @@
#include "llvm/Module.h"
#include "llvm/MC/MCContext.h"
+#include "llvm/Target/Mangler.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/StringMap.h"
@@ -28,7 +29,6 @@
// forward references to llvm classes
namespace llvm {
- class Mangler;
class MemoryBuffer;
class GlobalValue;
class Value;
@@ -78,15 +78,11 @@ private:
LTOModule(llvm::Module* m, llvm::TargetMachine* t);
bool ParseSymbols(std::string &errMsg);
- void addDefinedSymbol(llvm::GlobalValue* def,
- llvm::Mangler& mangler,
- bool isFunction);
- void addPotentialUndefinedSymbol(llvm::GlobalValue* decl,
- llvm::Mangler &mangler);
- void addDefinedFunctionSymbol(llvm::Function* f,
- llvm::Mangler &mangler);
- void addDefinedDataSymbol(llvm::GlobalValue* v,
- llvm::Mangler &mangler);
+ void addDefinedSymbol(llvm::GlobalValue* def,
+ bool isFunction);
+ void addPotentialUndefinedSymbol(llvm::GlobalValue* decl);
+ void addDefinedFunctionSymbol(llvm::Function* f);
+ void addDefinedDataSymbol(llvm::GlobalValue* v);
bool addAsmGlobalSymbols(std::string &errMsg);
void addAsmGlobalSymbol(const char *,
lto_symbol_attributes scope);
@@ -119,6 +115,7 @@ private:
llvm::StringMap<NameAndAttributes> _undefines;
std::vector<const char*> _asm_undefines;
llvm::MCContext _context;
+ llvm::Mangler _mangler;
};
#endif // LTO_MODULE_H