Fix Casting

Fix a casting-away-const compiler warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172471 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Greene 2013-01-14 21:04:47 +00:00
parent c2680bef3b
commit b398cae1e5

View File

@ -120,7 +120,8 @@ class MipsCodeEmitter : public MachineFunctionPass {
char MipsCodeEmitter::ID = 0;
bool MipsCodeEmitter::runOnMachineFunction(MachineFunction &MF) {
JTI = ((MipsTargetMachine&) MF.getTarget()).getJITInfo();
JTI = const_cast<MipsTargetMachine&>(
static_cast<const MipsTargetMachine&>(MF.getTarget())).getJITInfo();
II = ((const MipsTargetMachine&) MF.getTarget()).getInstrInfo();
TD = ((const MipsTargetMachine&) MF.getTarget()).getDataLayout();
Subtarget = &TM.getSubtarget<MipsSubtarget> ();