From b398cae1e501069c48456a4bfdf8bbf549aa9746 Mon Sep 17 00:00:00 2001 From: David Greene Date: Mon, 14 Jan 2013 21:04:47 +0000 Subject: [PATCH] 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 --- lib/Target/Mips/MipsCodeEmitter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Target/Mips/MipsCodeEmitter.cpp b/lib/Target/Mips/MipsCodeEmitter.cpp index 52fa95b1823..8efcd3c9c8f 100644 --- a/lib/Target/Mips/MipsCodeEmitter.cpp +++ b/lib/Target/Mips/MipsCodeEmitter.cpp @@ -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( + static_cast(MF.getTarget())).getJITInfo(); II = ((const MipsTargetMachine&) MF.getTarget()).getInstrInfo(); TD = ((const MipsTargetMachine&) MF.getTarget()).getDataLayout(); Subtarget = &TM.getSubtarget (); -- 2.34.1