Don't reach into the middle of TargetMachine and cache one of its ivars.

Not only does this break encapsulation, it's gross.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182876 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2013-05-29 20:37:19 +00:00
parent aae0fa998a
commit cc5a882c96
6 changed files with 13 additions and 11 deletions

View File

@@ -163,7 +163,7 @@ bool AsmPrinter::doInitialization(Module &M) {
const_cast<TargetLoweringObjectFile&>(getObjFileLowering())
.Initialize(OutContext, TM);
Mang = new Mangler(OutContext, *TM.getDataLayout());
Mang = new Mangler(OutContext, &TM);
// Allow the target to emit any magic that it wants at the start of the file.
EmitStartOfAsmFile(M);