Cleanup: Calls to getDwarfRegNum() may actually fail, if there is
authorAdrian Prantl <aprantl@apple.com>
Fri, 5 Dec 2014 01:02:46 +0000 (01:02 +0000)
committerAdrian Prantl <aprantl@apple.com>
Fri, 5 Dec 2014 01:02:46 +0000 (01:02 +0000)
commitab255fcd09a6fac10e597fbd8f92fd70dd321a6d
tree37c838dfdc1bbb26efbb7eb9515980e6ed159ab6
parentc29be67009382658bfe8b33a44630dcb52823d8a
Cleanup: Calls to getDwarfRegNum() may actually fail, if there is
no DWARF register number mapping, or if the register was a virtual
register that was never materialized. Previously, we would just emit a
bogus location, after this patch we don't emit a location at all by
doing an early exit.

After my bugfix in r223401 today, this doesn't actually happen on any
target that I tested this with, but it's still preferable to make the
possibility of a failure explicit.

llvm-svn: 223428
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h