[llvm] r186014 - Safeguard DBG_VALUE handling. Unbreaks the ASAN buildbot.

Adrian Prantl aprantl at apple.com
Wed Jul 10 09:56:47 PDT 2013


Author: adrian
Date: Wed Jul 10 11:56:47 2013
New Revision: 186014

URL: http://llvm.org/viewvc/llvm-project?rev=186014&view=rev
Log:
Safeguard DBG_VALUE handling. Unbreaks the ASAN buildbot.

Modified:
    llvm/trunk/lib/CodeGen/InlineSpiller.cpp

Modified: llvm/trunk/lib/CodeGen/InlineSpiller.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/InlineSpiller.cpp?rev=186014&r1=186013&r2=186014&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/InlineSpiller.cpp (original)
+++ llvm/trunk/lib/CodeGen/InlineSpiller.cpp Wed Jul 10 11:56:47 2013
@@ -1152,7 +1152,8 @@ void InlineSpiller::spillAroundUses(unsi
     // Debug values are not allowed to affect codegen.
     if (MI->isDebugValue()) {
       // Modify DBG_VALUE now that the value is in a spill slot.
-      uint64_t Offset = MI->getOperand(1).getImm();
+      bool IsIndirect = MI->getOperand(1).isImm();
+      uint64_t Offset = IsIndirect ? MI->getOperand(1).getImm() : 0;
       const MDNode *MDPtr = MI->getOperand(2).getMetadata();
       DebugLoc DL = MI->getDebugLoc();
       DEBUG(dbgs() << "Modifying debug info due to spill:" << "\t" << *MI);





More information about the llvm-commits mailing list