Add ARM specific emitFrameIndexDebugValue.
[oota-llvm.git] / lib / Target / ARM / ARMBaseRegisterInfo.cpp
index 2a4e1a853ab56d11f4f36791d48fb91801bc4082..bc1218743684165867570e8cb745ae07de3b88f4 100644 (file)
@@ -1183,6 +1183,13 @@ ARMBaseRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
     SPAdj = 0;
   Offset += SPAdj;
 
+  // Special handling of dbg_value instructions.
+  if (MI.isDebugValue()) {
+    MI.getOperand(i).  ChangeToRegister(FrameReg, false /*isDef*/);
+    MI.getOperand(i+1).ChangeToImmediate(Offset);
+    return 0;
+  }
+
   // Modify MI as necessary to handle as much of 'Offset' as possible
   bool Done = false;
   if (!AFI->isThumbFunction())