Safeguard DBG_VALUE handling. Unbreaks the ASAN buildbot.

llvm-svn: 186014
This commit is contained in:
Adrian Prantl 2013-07-10 16:56:47 +00:00
parent 9ae4707868
commit c31ec1c948
1 changed files with 2 additions and 1 deletions

View File

@ -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);