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
This commit is contained in:
Rafael Espindola
2015-06-23 13:59:29 +00:00
parent b7915a1f0b
commit c233f74e6e
19 changed files with 51 additions and 71 deletions

View File

@@ -37,9 +37,7 @@ using namespace object;
IRObjectFile::IRObjectFile(MemoryBufferRef Object, std::unique_ptr<Module> Mod)
: SymbolicFile(Binary::ID_IR, Object), M(std::move(Mod)) {
// Setup a mangler with the DataLayout.
const DataLayout &DL = M->getDataLayout();
Mang.reset(new Mangler(&DL));
Mang.reset(new Mangler());
const std::string &InlineAsm = M->getModuleInlineAsm();
if (InlineAsm.empty())