CodeGen: Stop using DIDescriptor::is*() and auto-casting

Same as r234255, but for lib/CodeGen and lib/Target.

llvm-svn: 234258
This commit is contained in:
Duncan P. N. Exon Smith
2015-04-06 23:27:40 +00:00
parent 6186fb2cd0
commit e686f1591f
22 changed files with 143 additions and 167 deletions

View File

@@ -358,7 +358,7 @@ public:
} // namespace
void UserValue::print(raw_ostream &OS, const TargetRegisterInfo *TRI) {
DIVariable DV(Variable);
DIVariable DV = cast<MDLocalVariable>(Variable);
OS << "!\"";
DV.printExtendedName(OS);
OS << "\"\t";
@@ -944,7 +944,8 @@ void UserValue::insertDebugValue(MachineBasicBlock *MBB, SlotIndex Idx,
MachineOperand &Loc = locations[LocNo];
++NumInsertedDebugValues;
assert(DIVariable(Variable)->isValidLocationForIntrinsic(getDebugLoc()) &&
assert(cast<MDLocalVariable>(Variable)
->isValidLocationForIntrinsic(getDebugLoc()) &&
"Expected inlined-at fields to agree");
if (Loc.isReg())
BuildMI(*MBB, I, getDebugLoc(), TII.get(TargetOpcode::DBG_VALUE),