OSDN Git Service

Debug Info: use DW_FORM_ref_addr instead of DW_FORM_ref4 if the referenced DIE
authorManman Ren <mren@apple.com>
Tue, 12 Mar 2013 18:27:15 +0000 (18:27 +0000)
committerManman Ren <mren@apple.com>
Tue, 12 Mar 2013 18:27:15 +0000 (18:27 +0000)
commitbc3e96f17bb278358cd3976f35b87591a392f5af
treec59c4eefb0e2cf7a67c9d80baf096c58331eb091
parent1a5c0510ecb029b7e5d04249cdd4e50b97bf1c3f
Debug Info: use DW_FORM_ref_addr instead of DW_FORM_ref4 if the referenced DIE
belongs to a different compile unit.

DW_FORM_ref_addr should be used for cross compile-unit reference.

When compiling a large application, we got a dwarfdump verification error where
abstract_origin points to nowhere.

This error can't be reproduced on any testing case in MultiSource.
We may have other cases where we use DW_FORM_ref4 unconditionally.

rdar://problem/13370501

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