From: Adrian Prantl Date: Wed, 10 Jul 2013 16:56:47 +0000 (+0000) Subject: Safeguard DBG_VALUE handling. Unbreaks the ASAN buildbot. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4759f26c31d5544c5e1c13edb8ab013be9a95338;p=oota-llvm.git Safeguard DBG_VALUE handling. Unbreaks the ASAN buildbot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186014 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/InlineSpiller.cpp b/lib/CodeGen/InlineSpiller.cpp index 2ab58a721ba..8910652c40b 100644 --- a/lib/CodeGen/InlineSpiller.cpp +++ b/lib/CodeGen/InlineSpiller.cpp @@ -1152,7 +1152,8 @@ void InlineSpiller::spillAroundUses(unsigned Reg) { // 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);