aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DIE.h
diff options
context:
space:
mode:
authorManman Ren <mren@apple.com>2013-03-12 18:27:15 +0000
committerManman Ren <mren@apple.com>2013-03-12 18:27:15 +0000
commitbc3e96f17bb278358cd3976f35b87591a392f5af (patch)
treec59c4eefb0e2cf7a67c9d80baf096c58331eb091 /lib/CodeGen/AsmPrinter/DIE.h
parent1a5c0510ecb029b7e5d04249cdd4e50b97bf1c3f (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/DIE.h')
-rw-r--r--lib/CodeGen/AsmPrinter/DIE.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DIE.h b/lib/CodeGen/AsmPrinter/DIE.h
index 35d7959ac1..9907b01ceb 100644
--- a/lib/CodeGen/AsmPrinter/DIE.h
+++ b/lib/CodeGen/AsmPrinter/DIE.h
@@ -152,6 +152,9 @@ namespace llvm {
const std::vector<DIE *> &getChildren() const { return Children; }
const SmallVector<DIEValue*, 32> &getValues() const { return Values; }
DIE *getParent() const { return Parent; }
+ /// Climb up the parent chain to get the compile unit DIE this DIE belongs
+ /// to.
+ DIE *getCompileUnit() const;
void setTag(unsigned Tag) { Abbrev.setTag(Tag); }
void setOffset(unsigned O) { Offset = O; }
void setSize(unsigned S) { Size = S; }