diff options
author | Adrian Prantl <aprantl@apple.com> | 2013-07-10 16:56:47 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2013-07-10 16:56:47 +0000 |
commit | c31ec1c9480d65542df18881900c08ffa3b68324 (patch) | |
tree | 1a830e8027a40885b198553927edb55df7d80a30 /llvm/lib | |
parent | 9ae47078687a4a18904f28174027bb12bf12747d (diff) | |
download | bcm5719-llvm-c31ec1c9480d65542df18881900c08ffa3b68324.tar.gz bcm5719-llvm-c31ec1c9480d65542df18881900c08ffa3b68324.zip |
Safeguard DBG_VALUE handling. Unbreaks the ASAN buildbot.
llvm-svn: 186014
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/InlineSpiller.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/InlineSpiller.cpp b/llvm/lib/CodeGen/InlineSpiller.cpp index 2ab58a721ba..8910652c40b 100644 --- a/llvm/lib/CodeGen/InlineSpiller.cpp +++ b/llvm/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); |