aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2013-07-10 16:56:47 +0000
committerAdrian Prantl <aprantl@apple.com>2013-07-10 16:56:47 +0000
commit4759f26c31d5544c5e1c13edb8ab013be9a95338 (patch)
treee2fc274effb309ee89a4f590c8993d9c51bfc0c9 /lib
parent5fa2ba2769d31815f54ebf1af42f868f1486e4d0 (diff)
downloadexternal_llvm-4759f26c31d5544c5e1c13edb8ab013be9a95338.tar.gz
external_llvm-4759f26c31d5544c5e1c13edb8ab013be9a95338.tar.bz2
external_llvm-4759f26c31d5544c5e1c13edb8ab013be9a95338.zip
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
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/InlineSpiller.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/InlineSpiller.cpp b/lib/CodeGen/InlineSpiller.cpp
index 2ab58a721b..8910652c40 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);