[llvm-commits] [llvm] r99993 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Chris Lattner sabre at nondot.org
Tue Mar 30 22:39:57 PDT 2010


Author: lattner
Date: Wed Mar 31 00:39:57 2010
New Revision: 99993

URL: http://llvm.org/viewvc/llvm-project?rev=99993&view=rev
Log:
use the isDebugValue() predicate and pop_back_val()

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=99993&r1=99992&r2=99993&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Mar 31 00:39:57 2010
@@ -2008,7 +2008,7 @@
     for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
          II != IE; ++II) {
       const MachineInstr *MInsn = II;
-      if (MInsn->getOpcode() != TargetOpcode::DBG_VALUE)
+      if (!MInsn->isDebugValue())
         continue;
 
       // FIXME : Lift this restriction.
@@ -2059,7 +2059,7 @@
   PrevDILoc = DILoc.getNode();
 
   // DBG_VALUE instruction establishes new value.
-  if (MI->getOpcode() == TargetOpcode::DBG_VALUE) {
+  if (MI->isDebugValue()) {
     DenseMap<const MachineInstr *, DbgVariable *>::iterator DI
       = DbgValueStartMap.find(MI);
     if (DI != DbgValueStartMap.end()) {
@@ -2091,7 +2091,7 @@
 /// endScope - Process end of a scope.
 void DwarfDebug::endScope(const MachineInstr *MI) {
   // Ignore DBG_VALUE instruction.
-  if (MI->getOpcode() == TargetOpcode::DBG_VALUE)
+  if (MI->isDebugValue())
     return;
 
   // Check location.
@@ -2142,7 +2142,7 @@
 }
 
 /// extractScopeInformation - Scan machine instructions in this function
-/// and collect DbgScopes. Return true, if atleast one scope was found.
+/// and collect DbgScopes. Return true, if at least one scope was found.
 bool DwarfDebug::extractScopeInformation() {
   // If scope information was extracted using .dbg intrinsics then there is not
   // any need to extract these information by scanning each instruction.
@@ -2158,7 +2158,7 @@
          II != IE; ++II) {
       const MachineInstr *MInsn = II;
       // FIXME : Remove DBG_VALUE check.
-      if (MInsn->getOpcode() == TargetOpcode::DBG_VALUE) continue;
+      if (MInsn->isDebugValue()) continue;
       MIIndexMap[MInsn] = MIIndex++;
       DebugLoc DL = MInsn->getDebugLoc();
       if (DL.isUnknown()) continue;
@@ -2181,7 +2181,7 @@
          II != IE; ++II) {
       const MachineInstr *MInsn = II;
       // FIXME : Remove DBG_VALUE check.
-      if (MInsn->getOpcode() == TargetOpcode::DBG_VALUE) continue;
+      if (MInsn->isDebugValue()) continue;
       DebugLoc DL = MInsn->getDebugLoc();
       if (DL.isUnknown())  continue;
       DILocation DLT = MF->getDILocation(DL);
@@ -2209,7 +2209,7 @@
   SmallVector<DbgScope *, 4> WorkList;
   WorkList.push_back(CurrentFnDbgScope);
   while (!WorkList.empty()) {
-    DbgScope *S = WorkList.back(); WorkList.pop_back();
+    DbgScope *S = WorkList.pop_back_val();
 
     const SmallVector<DbgScope *, 4> &Children = S->getScopes();
     if (!Children.empty()) 





More information about the llvm-commits mailing list