Revert "Debug Info: Bail out of AddMachineRegPiece() if MachineReg is not a"
authorAdrian Prantl <aprantl@apple.com>
Wed, 14 Jan 2015 00:15:12 +0000 (00:15 +0000)
committerAdrian Prantl <aprantl@apple.com>
Wed, 14 Jan 2015 00:15:12 +0000 (00:15 +0000)
This reverts commit r225852, it was a bad idea.

MachineReg should always be a physical register. If it isn't this DebugLoc
shouldn't have been created in the first place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225857 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfExpression.cpp

index 26c2a20dea19f7c51bc77c05ce72895bd82e0d56..4c16ae70d1f344147d134c92acd91977568db65c 100644 (file)
@@ -93,12 +93,6 @@ void DwarfExpression::AddMachineRegPiece(unsigned MachineReg,
                                          unsigned PieceSizeInBits,
                                          unsigned PieceOffsetInBits) {
   const TargetRegisterInfo *TRI = getTRI();
                                          unsigned PieceSizeInBits,
                                          unsigned PieceOffsetInBits) {
   const TargetRegisterInfo *TRI = getTRI();
-  if (!TRI->isPhysicalRegister(MachineReg)) {
-    // FIXME: We have no reasonable way of handling errors in here.
-    EmitOp(dwarf::DW_OP_nop, "nop (could not find a dwarf register number)");
-    return;
-  }
-
   int Reg = TRI->getDwarfRegNum(MachineReg, false);
 
   // If this is a valid register number, emit it.
   int Reg = TRI->getDwarfRegNum(MachineReg, false);
 
   // If this is a valid register number, emit it.