llvm-project/llvm/test/DebugInfo/Generic
Keno Fischer 25916079ff Reapply r257105 "[Verifier] Check that debug values have proper size"
The follow extra changes were made to test cases:

Manually making the variable be the actual type instead of a pointer
to avoid pointer-size differences in generic code:

    LLVM :: DebugInfo/Generic/2010-03-24-MemberFn.ll
    LLVM :: DebugInfo/Generic/2010-04-06-NestedFnDbgInfo.ll
    LLVM :: DebugInfo/Generic/2010-05-03-DisableFramePtr.ll
    LLVM :: DebugInfo/Generic/varargs.ll

Delete sizing information from debug info for the same reason
(but the presence of the pointer was important to the test case):

    LLVM :: DebugInfo/Generic/restrict.ll
    LLVM :: DebugInfo/Generic/tu-composite.ll
    LLVM :: Linker/type-unique-type-array-a.ll
    LLVM :: Linker/type-unique-simple2.ll

Fixing an incorrect DW_OP_deref

    LLVM :: DebugInfo/Generic/2010-05-03-OriginDIE.ll

Fixing a missing DW_OP_deref

    LLVM :: DebugInfo/Generic/incorrect-variable-debugloc.ll

Additionally, clang should no longer complain during bootstrap should no
longer happen after r257534.

The original commit message was:
```
Summary:
Teach the Verifier to make sure that the storage size given to llvm.dbg.declare
or the value size given to llvm.dbg.value agree with what is declared in
DebugInfo. This is implicitly assumed in a number of passes (e.g. in SROA).
Additionally this catches a number of common mistakes, such as passing a
pointer when a value was intended or vice versa.

One complication comes from stack coloring which modifies the original IR when
it merges allocas in order to make sure that if AA falls back to the IR it gets
the correct result. However, given this new invariant, indiscriminately
replacing one alloca by a different (differently sized one) is no longer valid.
Fix this by just undefing out any use of the alloca in a dbg.declare in this
case.

Additionally, I had to fix a number of test cases. Of particular note:
- I regenerated dbg-changes-codegen-branch-folding.ll from the given source as
  it was affected by the bug fixed in r256077
- two-cus-from-same-file.ll was changed to avoid having a variable-typed debug
  variable as that would depend on the target, even though this test is
  supposed to be generic
- I had to manually declared size/align for reference type. See also the
  discussion for D14275/r253186.
- fpstack-debuginstr-kill.ll required changing `double` to `long double`
- most others were just a question of adding OP_deref
```

llvm-svn: 257550
2016-01-13 00:31:44 +00:00
..
Inputs DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
2009-10-16-Phi.ll
2009-11-03-InsertExtractValue.ll
2009-11-05-DeadGlobalVariable.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
2009-11-06-NamelessGlobalVariable.ll
2009-11-10-CurrentFn.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
2010-01-05-DbgScope.ll
2010-03-12-llc-crash.ll
2010-03-19-DbgDeclare.ll
2010-03-24-MemberFn.ll Reapply r257105 "[Verifier] Check that debug values have proper size" 2016-01-13 00:31:44 +00:00
2010-04-06-NestedFnDbgInfo.ll Reapply r257105 "[Verifier] Check that debug values have proper size" 2016-01-13 00:31:44 +00:00
2010-04-19-FramePtr.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
2010-05-03-DisableFramePtr.ll Reapply r257105 "[Verifier] Check that debug values have proper size" 2016-01-13 00:31:44 +00:00
2010-05-03-OriginDIE.ll Reapply r257105 "[Verifier] Check that debug values have proper size" 2016-01-13 00:31:44 +00:00
2010-05-10-MultipleCU.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
2010-06-29-InlinedFnLocalVar.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
2010-07-19-Crash.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
2010-10-01-crash.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
PR20038.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
accel-table-hash-collisions.ll
array.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
block-asan.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
bug_null_debuginfo.ll
constant-pointers.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
constant-sdnodes-have-dbg-location.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
constantfp-sdnodes-have-dbg-location.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
cross-cu-inlining.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
cross-cu-linkonce-distinct.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
cross-cu-linkonce.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
cu-range-hole.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
cu-ranges.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
dbg-at-specficiation.ll
dead-argument-order.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
debug-info-always-inline.ll
debug-info-qualifiers.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
debuginfofinder-forward-declaration.ll
debuginfofinder-multiple-cu.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
def-line.ll Removing specific target from the generic test 2015-11-19 12:24:47 +00:00
discriminator.ll Removing specific target from the generic test 2015-11-18 17:50:47 +00:00
dwarf-public-names.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
empty.ll
enum-types.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
enum.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
global.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
gmlt.test
gvn.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
incorrect-variable-debugloc.ll Reapply r257105 "[Verifier] Check that debug values have proper size" 2016-01-13 00:31:44 +00:00
incorrect-variable-debugloc1.ll Reapply r257105 "[Verifier] Check that debug values have proper size" 2016-01-13 00:31:44 +00:00
inheritance.ll
inline-debug-info-multiret.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
inline-debug-info.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
inline-no-debug-info.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
inline-scopes.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
inlined-arguments.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
inlined-vars.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
lit.local.cfg
location-verifier.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
lto-comp-dir.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
member-order.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
member-pointers.ll
missing-abstract-variable.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
multiline.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
namespace.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
namespace_function_definition.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
namespace_inline_function_definition.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
nodebug.ll
piece-verifier.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
ptrsize.ll Fix r253186 test case 2015-11-16 08:25:14 +00:00
recursive_inlining.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
restrict.ll Reapply r257105 "[Verifier] Check that debug values have proper size" 2016-01-13 00:31:44 +00:00
skeletoncu.ll [Hexagon] XFAILing test while diagnosing backend error. 2015-10-01 21:19:03 +00:00
sugared-constants.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
template-recursive-void.ll
tu-composite.ll Reapply r257105 "[Verifier] Check that debug values have proper size" 2016-01-13 00:31:44 +00:00
tu-member-pointer.ll
two-cus-from-same-file.ll Reapply r257105 "[Verifier] Check that debug values have proper size" 2016-01-13 00:31:44 +00:00
typedef.ll
unconditional-branch.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
varargs.ll Reapply r257105 "[Verifier] Check that debug values have proper size" 2016-01-13 00:31:44 +00:00
version.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00