[PATCH] D29609: [dsymutil] Follow dependencies during ODR uniquing
Alexander Shaposhnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 6 16:43:24 PST 2017
alexshap added a comment.
example without functions is a bit simpler:
preprocessed Source1.cpp:
\# 1 "Header.h" 1
typedef struct S *Sptr;
\# 3 "Source1.cpp" 2
Sptr ptr1;
preprocessed Source2.cpp:
\# 1 "Header.h" 1
typedef struct S *Sptr;
\# 3 "Source1.cpp" 2
struct S { int field; };
Sptr ptr2;
A. "broken" order of the walked DIEs (while marking them as "kept"):
Source1.o: DW_TAG_variable -> /* parent walk */ -> DW_TAG_typedef -> DW_TAG_pointer_type -> DW_TAG_structure_type (forward declaration, can be ignored, that's ok)
Source2.o DW_TAG_variable -> /* parent walk */ -> looking at DW_TAG_typedef (already seen, exactly at the same location (1 "Header.h" 1) , "continue" is executed and we don't "follow"
the attributes.
B. "fixed "order of the walked DIEs (while marking them as "kept"):
Source1.o: DW_TAG_variable -> /* parent walk */ -> DW_TAG_typedef -> DW_TAG_pointer_type -> DW_TAG_structure_type (forward declaration, can be ignored, that's ok)
Source2.o DW_TAG_variable -> /* parent wak */ -> looking at DW_TAG_typedef (already seen, exactly at the same location (1 "Header.h" 1), marking it as ODRSeen) -> DW_TAG_pointer_type -> DW_TAG_structure_type -> DW_TAG_member -> DW_TAG_base_type
Repository:
rL LLVM
https://reviews.llvm.org/D29609
More information about the llvm-commits
mailing list