aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-04-27 22:04:41 +0000
committerDevang Patel <dpatel@apple.com>2010-04-27 22:04:41 +0000
commit97303ee27d3985363987ccdd04a8147713462308 (patch)
tree79309b0f314e5e461ffc39770f3ca66c6cc3f5b9 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parentdcde3db38eaf6f32f96e5f5373b8b29013d272b3 (diff)
Use isReg(), isImm() and isFPImm().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102470 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index be65b82809..eb5bba42db 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1537,17 +1537,15 @@ DIE *DwarfDebug::constructVariableDIE(DbgVariable *DV, DbgScope *Scope) {
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 @@ DIE *DwarfDebug::constructVariableDIE(DbgVariable *DV, DbgScope *Scope) {
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 @@ void DwarfDebug::collectVariableInfo() {
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(