1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test
David Blaikie ca9c6bd8ed DebugInfo: Fix ordering of members after r191928
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
2013-10-04 01:39:59 +00:00
..
Analysis Remove the very substantial, largely unmaintained legacy PGO 2013-10-02 15:42:23 +00:00
Assembler Remove verifier check that attribute 'builtin' is only applied to calls to 2013-09-07 00:25:48 +00:00
Bindings/Ocaml
Bitcode AutoUpgrade: upgrade from scalar TBAA format to struct-path aware TBAA format. 2013-09-28 00:22:27 +00:00
BugPoint
CodeGen [arm] Enhance the test case by checking .fpu directive. 2013-10-03 12:18:56 +00:00
DebugInfo DebugInfo: Fix ordering of members after r191928 2013-10-04 01:39:59 +00:00
ExecutionEngine Adding support and tests for multiple module handling in lli 2013-10-04 00:49:38 +00:00
Feature Implement function prefix data as an IR feature. 2013-09-16 01:08:15 +00:00
FileCheck
Instrumentation ObjectSizeOffsetEvaluator: Don't run into infinite recursion if we have a cyclic GEP. 2013-09-29 19:39:13 +00:00
Integer
JitListener Debug Info Testing: updated to use NULL instead of "i32 0" in a few fields. 2013-09-06 21:03:58 +00:00
Linker Debug Info: In DIBuilder, the derived-from field of a DW_TAG_pointer_type 2013-10-01 23:45:54 +00:00
LTO Optimize linkonce_odr unnamed_addr functions during LTO. 2013-10-03 18:29:09 +00:00
MC [ARM] Warn on deprecated IT blocks in v8 AArch32 assembly. 2013-10-03 09:31:51 +00:00
Object
Other
TableGen
tools Resurrect lit.local.cfg to un-break hexagon buildbot. 2013-09-27 21:26:38 +00:00
Transforms Pull fptrunc's upwards through selects when one of the select's selectands was a constant. This has a number of benefits, including producing small immediates (easier to materialize, smaller constant pools) as well as being more likely to allow the fptrunc to fuse with a preceding instruction (truncating selects are unusual). 2013-10-03 21:08:05 +00:00
Unit
Verifier
YAMLParser
CMakeLists.txt Fixing lli-child-target build 2013-10-02 22:27:23 +00:00
lit.cfg Remove the very substantial, largely unmaintained legacy PGO 2013-10-02 15:42:23 +00:00
lit.site.cfg.in Fix LTO handling of module-level assembly (PR14152). 2013-09-19 22:15:52 +00:00
Makefile Fix LTO handling of module-level assembly (PR14152). 2013-09-19 22:15:52 +00:00
Makefile.tests
TestRunner.sh