summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
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/AsmPrinter/AsmPrinter.cpp
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/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp7
1 files changed, 3 insertions, 4 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);
}
OpenPOWER on IntegriCloud