Debug info: Fix PR22296 by omitting the DW_AT_location if we lost the
authorAdrian Prantl <aprantl@apple.com>
Sun, 25 Jan 2015 19:04:08 +0000 (19:04 +0000)
committerAdrian Prantl <aprantl@apple.com>
Sun, 25 Jan 2015 19:04:08 +0000 (19:04 +0000)
commit10543e8587c618393b12ae43ae0908e24e6937af
treea89c3f6d244de9a4a53d02d09515ec297322b551
parent9dbb6a4f636b39a4e68a8c39dc6ab04507decd82
Debug info: Fix PR22296 by omitting the DW_AT_location if we lost the
physical register that is described in a DBG_VALUE.

In the testcase the DBG_VALUE describing "p5" becomes unavailable
because the register its address is in is clobbered and we (currently)
aren't smart enough to realize that the value is rematerialized immediately
after the DBG_VALUE and/or is actually a stack slot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227056 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
lib/CodeGen/AsmPrinter/DwarfExpression.cpp
test/DebugInfo/X86/nophysreg.ll [new file with mode: 0644]