diff options
author | Manman Ren <mren@apple.com> | 2013-03-12 18:27:15 +0000 |
---|---|---|
committer | Manman Ren <mren@apple.com> | 2013-03-12 18:27:15 +0000 |
commit | bc3e96f17bb278358cd3976f35b87591a392f5af (patch) | |
tree | c59c4eefb0e2cf7a67c9d80baf096c58331eb091 /lib/CodeGen/AsmPrinter/DwarfDebug.h | |
parent | 1a5c0510ecb029b7e5d04249cdd4e50b97bf1c3f (diff) |
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
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.h')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h index 771bc362cb..81e345e628 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -274,6 +274,10 @@ public: /// \brief Returns the address pool. AddrPool *getAddrPool() { return &AddressPool; } + + /// \brief for a given compile unit DIE, returns offset from beginning of + /// debug info. + unsigned getCUOffset(DIE *Die); }; /// \brief Collects and handles dwarf debug information. |