mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
ca9c6bd8ed
In the case (shown in the attached test) where a member function definition was emitted into debug info the following could occur: 1) build the debug info for the member function definition 2) in (1), build the debug info for the member function declaration 3) construct and add the member function declaration DIE 4) add it to its context 5) build its context (the type it is a member of) 6) construct the members and add them to the type 7) except don't add member functions because "getOrCreateSubprogram" adds the function to its parent anyway 8) except we're only partway through building this subprogram declaration so it hasn't been added yet - but we returned the partially constructed DIE (since it's already in the MDNode->DIE mapping to avoid infinitely recursing trying to create the member function DIE) 9) once the type is constructed, add the member function to it 10) now the members are out of order (the member function being defined is listed as the last member, even though it was declared as the first) To avoid this, construct the context of the subprogram DIE before we query to see if it exists. That way we never end up creating it before creating its context and ending up in this situation. Alternatively, the type construction that visits/builds all the members could call something like getOrCreateSubprogram, but that doesn't ever do the "add to context" step. Then the type building code would always be responsible for adding members (and the subprogram "addToContextDIE" would no-op because the context building would have added the subprogram declaration to the type/context DIE already). (the test cases updated were overly-sensitive to offsets or abbreviation numbers. We don't have a nice way to make these tests more robust as yet - multiline FileCheck matches would be required) llvm-svn: 191939 |
||
---|---|---|
.. | ||
Analysis | ||
Assembler | ||
Bindings/Ocaml | ||
Bitcode | ||
BugPoint | ||
CodeGen | ||
DebugInfo | ||
ExecutionEngine | ||
Feature | ||
FileCheck | ||
Instrumentation | ||
Integer | ||
JitListener | ||
Linker | ||
LTO | ||
MC | ||
Object | ||
Other | ||
TableGen | ||
tools | ||
Transforms | ||
Unit | ||
Verifier | ||
YAMLParser | ||
CMakeLists.txt | ||
lit.cfg | ||
lit.site.cfg.in | ||
Makefile | ||
Makefile.tests | ||
TestRunner.sh |