[llvm] r225857 - Revert "Debug Info: Bail out of AddMachineRegPiece() if MachineReg is not a"

Adrian Prantl aprantl at apple.com
Tue Jan 13 16:15:12 PST 2015


Author: adrian
Date: Tue Jan 13 18:15:12 2015
New Revision: 225857

URL: http://llvm.org/viewvc/llvm-project?rev=225857&view=rev
Log:
Revert "Debug Info: Bail out of AddMachineRegPiece() if MachineReg is not a"

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.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.cpp?rev=225857&r1=225856&r2=225857&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.cpp Tue Jan 13 18:15:12 2015
@@ -93,12 +93,6 @@ void DwarfExpression::AddMachineRegPiece
                                          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.





More information about the llvm-commits mailing list