[llvm-commits] [llvm] r102470 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Devang Patel
dpatel at apple.com
Tue Apr 27 15:04:41 PDT 2010
Author: dpatel
Date: Tue Apr 27 17:04:41 2010
New Revision: 102470
URL: http://llvm.org/viewvc/llvm-project?rev=102470&view=rev
Log:
Use isReg(), isImm() and isFPImm().
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=102470&r1=102469&r2=102470&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue Apr 27 17:04:41 2010
@@ -1537,17 +1537,15 @@
if (const MachineInstr *DbgValueInsn = DV->getDbgValue()) {
if (DbgValueInsn->getNumOperands() == 3) {
// FIXME : Handle getNumOperands != 3
- if (DbgValueInsn->getOperand(0).getType()
- == MachineOperand::MO_Register
- && DbgValueInsn->getOperand(0).getReg()) {
+ if (DbgValueInsn->getOperand(0).isReg() &&
+ DbgValueInsn->getOperand(0).getReg()) {
MachineLocation Location;
Location.set(DbgValueInsn->getOperand(0).getReg());
addAddress(VariableDie, dwarf::DW_AT_location, Location);
if (MCSymbol *VS = DV->getDbgValueLabel())
addLabel(VariableDie, dwarf::DW_AT_start_scope, dwarf::DW_FORM_addr,
VS);
- } else if (DbgValueInsn->getOperand(0).getType() ==
- MachineOperand::MO_Immediate) {
+ } else if (DbgValueInsn->getOperand(0).isImm()) {
DIEBlock *Block = new (DIEValueAllocator) DIEBlock();
unsigned Imm = DbgValueInsn->getOperand(0).getImm();
addUInt(Block, 0, dwarf::DW_FORM_udata, Imm);
@@ -1555,8 +1553,7 @@
if (MCSymbol *VS = DV->getDbgValueLabel())
addLabel(VariableDie, dwarf::DW_AT_start_scope, dwarf::DW_FORM_addr,
VS);
- } else if (DbgValueInsn->getOperand(0).getType() ==
- MachineOperand::MO_FPImmediate) {
+ } else if (DbgValueInsn->getOperand(0).isFPImm()) {
DIEBlock *Block = new (DIEValueAllocator) DIEBlock();
APFloat FPImm = DbgValueInsn->getOperand(0).getFPImm()->getValueAPF();
@@ -2083,8 +2080,7 @@
continue;
// Ignore Undef values.
- if (MInsn->getOperand(0).getType() == MachineOperand::MO_Register
- && !MInsn->getOperand(0).getReg())
+ if (MInsn->getOperand(0).isReg() && !MInsn->getOperand(0).getReg())
continue;
DIVariable DV(
More information about the llvm-commits
mailing list