[PATCH] This phabricator revision is the merge of 4 patches that aim to provide resolving of AT_abstract_origin and AT_specification attributes.

David Blaikie dblaikie at gmail.com
Fri Sep 5 13:57:20 PDT 2014


================
Comment at: lib/DebugInfo/DWARFDebugInfoEntry.cpp:319
@@ +318,3 @@
+      Offset >= U->getNextUnitOffset()) {
+    U = U->getContext().getCompileUnitForOffset(Offset);
+    assert(U && "Invalid DIE referenced.");
----------------
samsonov wrote:
> dblaikie wrote:
> > Is "getCompileUnitForOffset" cheap enough that we should just always call it? (& maybe pass in the context to this function, rather than the DWARFUnit, at that point)
> This part makes no sense to me. We definitely should somehow ensure that "this" is in a fact a DIE in "U". When you call DWARFDebugInfoEntry::getSubroutineName(), you certainly should know which unit this DIE belongs to. How can it be not so?
LLVM under LTO will generate DIE references across the CUs (in an effort to reduce debug info size - eg: rather than putting a type (even a declaration) in multiple CUs, one CU just references directly into the other CU to reference the type defined there) - so you actually don't know.

http://reviews.llvm.org/D5208






More information about the llvm-commits mailing list