Add const qualifiers to CodeGen's use of LLVM IR constructs.
[oota-llvm.git] / lib / CodeGen / SelectionDAG / InstrEmitter.cpp
index 9495f823267f75ec37621fc4965909f62c5c05ae..75557e77b842a08b58c9588d33fb4c6e32a2dcbe 100644 (file)
@@ -531,10 +531,10 @@ MachineInstr *InstrEmitter::EmitDbgValue(SDDbgValue *SD,
       AddOperand(&*MIB, Op, (*MIB).getNumOperands(), &II, VRBaseMap,
                  true /*IsDebug*/);
   } else if (SD->getKind() == SDDbgValue::CONST) {
-    Value *V = SD->getConst();
-    if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
+    const Value *V = SD->getConst();
+    if (const ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
       MIB.addImm(CI->getSExtValue());
-    } else if (ConstantFP *CF = dyn_cast<ConstantFP>(V)) {
+    } else if (const ConstantFP *CF = dyn_cast<ConstantFP>(V)) {
       MIB.addFPImm(CF);
     } else {
       // Could be an Undef.  In any case insert an Undef so we can see what we