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

@ -19,6 +19,7 @@
#include "llvm/IR/Function.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
@ -226,7 +227,7 @@ void Mangler::getNameWithPrefix(SmallVectorImpl<char> &OutName,
// "Pure" variadic functions do not receive @0 suffix.
(!FT->isVarArg() || FT->getNumParams() == 0 ||
(FT->getNumParams() == 1 && F->hasStructRetAttr())))
AddFastCallStdCallSuffix(OutName, F, TD);
AddFastCallStdCallSuffix(OutName, F, *TM->getDataLayout());
}
}
}