]> granicus.if.org Git - llvm/commit
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)
commit74fb019dd0be04e2e788d81562969ae7cce36a35
tree62e0f1778e5879793150b8558566aa87bb4a3c3c
parentaf25a5d9b791ab191f7db9000cb498e623277e86
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223428 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
lib/CodeGen/AsmPrinter/DwarfUnit.h