summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-06-23 13:59:29 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-06-23 13:59:29 +0000
commitc233f74e6e36bada9e85b02a2f6b5b18002efb2d (patch)
tree93c45d633396baaad1b7e2b55278d96c5f2a90f5 /llvm/lib/CodeGen
parentb7915a1f0be2395b6caf97ea4c032ad8a7b048e4 (diff)
downloadbcm5719-llvm-c233f74e6e36bada9e85b02a2f6b5b18002efb2d.tar.gz
bcm5719-llvm-c233f74e6e36bada9e85b02a2f6b5b18002efb2d.zip
Simplify the Mangler interface now that DataLayout is mandatory.
We only need to pass in a DataLayout when mangling a raw string, not when constructing the mangler. llvm-svn: 240405
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp7
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp2
2 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 95da5887658..9e845e0e99b 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -179,7 +179,7 @@ bool AsmPrinter::doInitialization(Module &M) {
OutStreamer->InitSections(false);
- Mang = new Mangler(TM.getDataLayout());
+ Mang = new Mangler();
// Emit the version-min deplyment target directive if needed.
//
@@ -2292,11 +2292,10 @@ MCSymbol *AsmPrinter::getSymbolWithGlobalValueBase(const GlobalValue *GV,
TM);
}
-/// GetExternalSymbolSymbol - Return the MCSymbol for the specified
-/// ExternalSymbol.
+/// Return the MCSymbol for the specified ExternalSymbol.
MCSymbol *AsmPrinter::GetExternalSymbolSymbol(StringRef Sym) const {
SmallString<60> NameStr;
- Mang->getNameWithPrefix(NameStr, Sym);
+ Mangler::getNameWithPrefix(NameStr, Sym, *TM.getDataLayout());
return OutContext.getOrCreateSymbol(NameStr);
}
diff --git a/llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp
index 802456b10d6..2ceec61ab5c 100644
--- a/llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp
@@ -58,7 +58,7 @@ static void EmitCamlGlobal(const Module &M, AsmPrinter &AP, const char *Id) {
SymName[Letter] = toupper(SymName[Letter]);
SmallString<128> TmpStr;
- AP.Mang->getNameWithPrefix(TmpStr, SymName);
+ Mangler::getNameWithPrefix(TmpStr, SymName, M.getDataLayout());
MCSymbol *Sym = AP.OutContext.getOrCreateSymbol(TmpStr);
OpenPOWER on IntegriCloud