rust/tests/debuginfo
Kyle Huey 7ed9f945a2 Don't leave debug locations for constants sitting on the builder indefinitely.
Because constants are currently emitted *before* the prologue, leaving the
debug location on the IRBuilder spills onto other instructions in the prologue
and messes up both line numbers as well as the point LLVM chooses to be the
prologue end.

Example LLVM IR (irrelevant IR elided):
Before:

define internal { i64, i64 } @_ZN3tmp3Foo18var_return_opt_try17he02116165b0fc08cE(ptr align 8 %self) !dbg !347 {
start:
  %self.dbg.spill = alloca [8 x i8], align 8
  %_0 = alloca [16 x i8], align 8
  %residual.dbg.spill = alloca [0 x i8], align 1
    #dbg_declare(ptr %residual.dbg.spill, !353, !DIExpression(), !357)
  store ptr %self, ptr %self.dbg.spill, align 8, !dbg !357
    #dbg_declare(ptr %self.dbg.spill, !350, !DIExpression(), !358)

After:

define internal { i64, i64 } @_ZN3tmp3Foo18var_return_opt_try17h00b17d08874ddd90E(ptr align 8 %self) !dbg !347 {
start:
  %self.dbg.spill = alloca [8 x i8], align 8
  %_0 = alloca [16 x i8], align 8
  %residual.dbg.spill = alloca [0 x i8], align 1
    #dbg_declare(ptr %residual.dbg.spill, !353, !DIExpression(), !357)
  store ptr %self, ptr %self.dbg.spill, align 8
    #dbg_declare(ptr %self.dbg.spill, !350, !DIExpression(), !358)

Note in particular how !357 from %residual.dbg.spill's dbg_declare no longer
falls through onto the store to %self.dbg.spill. This fixes argument values
at entry when the constant is a ZST (e.g. <Option as Try>::Residual). This
fixes #130003 (but note that it does *not* fix issues with argument values and
non-ZST constants, which emit their own stores that have debug info on them,
like #128945).
2024-09-06 23:12:18 +00:00
..
auxiliary [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
associated-types.rs Fixup tests 2024-08-18 17:41:01 -04:00
basic-types-globals-metadata.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
basic-types-globals.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
basic-types-metadata.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
basic-types-mut-globals.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
basic-types.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
borrowed-basic.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
borrowed-c-style-enum.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
borrowed-enum.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
borrowed-struct.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
borrowed-tuple.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
borrowed-unique-basic.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
box.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
boxed-struct.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
by-value-non-immediate-argument.rs Replace gdbr with gdbg 2024-08-18 12:39:07 -04:00
by-value-self-argument-in-trait-impl.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
c-style-enum-in-composite.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
c-style-enum.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
captured-fields-1.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
captured-fields-2.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
closure-in-generic-function.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
collapse-debuginfo-external-attr.rs debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo] 2024-04-25 22:14:47 +03:00
collapse-debuginfo-external-flag-overriden-by-attr.rs debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo] 2024-04-25 22:14:47 +03:00
collapse-debuginfo-external-flag.rs debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo] 2024-04-25 22:14:47 +03:00
collapse-debuginfo-in-non-collapse-macro.rs debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo] 2024-04-25 22:14:47 +03:00
collapse-debuginfo-no-attr.rs debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo] 2024-04-25 22:14:47 +03:00
collapse-debuginfo-static-external.rs Add debuginfo tests for collapse_debuginfo for statics. 2024-06-13 16:04:31 +02:00
collapse-debuginfo-static.rs Add debuginfo tests for collapse_debuginfo for statics. 2024-06-13 16:04:31 +02:00
collapse-debuginfo-with-attr-flag.rs debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo] 2024-04-25 22:14:47 +03:00
collapse-debuginfo-with-attr.rs debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo] 2024-04-25 22:14:47 +03:00
collapse-debuginfo-with-yes-flag.rs debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo] 2024-04-25 22:14:47 +03:00
constant-debug-locs.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
constant-in-match-pattern.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
coroutine-locals.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
coroutine-objects.rs Delete redundant gdb-version requirements and related comments 2024-08-18 16:58:25 -04:00
cross-crate-spans.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
cross-crate-type-uniquing.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
destructured-fn-argument.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
destructured-for-loop-variable.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
destructured-local.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
drop-locations.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
dummy_span.rs Add a test. 2024-08-19 17:10:43 -07:00
duration-type.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
embedded-visualizer-point.natvis
embedded-visualizer-point.py
embedded-visualizer.natvis
embedded-visualizer.py
embedded-visualizer.rs Delete redundant gdb-version requirements and related comments 2024-08-18 16:58:25 -04:00
empty-string.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
enum-thinlto.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
evec-in-struct.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
extern-c-fn.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
f16-natvis.rs Add Natvis visualiser and debuginfo tests for f16 2024-07-09 03:47:50 +01:00
fixed-sized-array.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
function-arg-initialization.rs Delete gdbg commands 2024-08-18 12:39:06 -04:00
function-arguments.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
function-call.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
function-names.rs remove const arg windows debug info tests 2024-06-05 22:39:42 +01:00
function-prologue-stepping-regular.rs Enable debuginfo tests that have been temporarily disabled for years 2024-08-11 14:20:15 -04:00
gdb-char.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
gdb-pretty-struct-and-enums.rs Delete redundant gdb-version requirements and related comments 2024-08-18 16:58:25 -04:00
generic-enum-with-different-disr-sizes.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
generic-function.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
generic-functions-nested.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
generic-method-on-generic-struct.rs Fixup tests 2024-08-18 17:41:01 -04:00
generic-static-method-on-struct-and-enum.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
generic-struct-style-enum.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
generic-struct.rs Fixup tests 2024-08-18 17:41:01 -04:00
generic-tuple-style-enum.rs Delete lldbr annotations 2024-08-18 16:59:58 -04:00
include_string.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
issue-7712.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
issue-12886.rs Enable more debuginfo tests on Windows 2024-08-16 21:14:45 -04:00
issue-13213.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
issue-14411.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
issue-22656.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
issue-57822.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
lexical-scope-in-for-loop.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
lexical-scope-in-if-let.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
lexical-scope-in-if.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
lexical-scope-in-match.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
lexical-scope-in-parameterless-closure.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
lexical-scope-in-stack-closure.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
lexical-scope-in-unconditional-loop.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
lexical-scope-in-unique-closure.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
lexical-scope-in-while.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
lexical-scope-with-macro.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
lexical-scopes-in-block-expression.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
limited-debuginfo.rs Replace gdbr with gdbg 2024-08-18 12:39:07 -04:00
macro-stepping.inc
macro-stepping.rs Enable more debuginfo tests on Windows 2024-08-16 21:14:45 -04:00
marker-types.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
method-on-enum.rs Replace gdbr with gdbg 2024-08-18 12:39:07 -04:00
method-on-generic-struct.rs Fixup tests 2024-08-18 17:41:01 -04:00
method-on-struct.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
method-on-trait.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
method-on-tuple-struct.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
msvc-pretty-enums.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
msvc-scalarpair-params.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
multi-byte-chars.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
multi-cgu.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
multiple-functions-equal-var-names.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
multiple-functions.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
mutable-locs.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
mutex.rs std: move Once implementations to sys 2024-03-12 15:41:06 +01:00
name-shadowing-and-scope-nesting.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
no_mangle-info.rs Fix remaining LLDB commands. 2024-03-15 20:30:45 +01:00
numeric-types.rs Delete redundant gdb-version requirements and related comments 2024-08-18 16:58:25 -04:00
option-like-enum.rs Make option-like-enum.rs UB-free and portable 2024-08-27 19:12:14 -04:00
packed-struct-with-destructor.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
packed-struct.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
path.rs Add rust-lldb pretty printing for Path and PathBuf 2024-03-29 18:02:26 -06:00
pretty-huge-vec.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
pretty-slices.rs Replace gdbr with gdbg 2024-08-18 12:39:07 -04:00
pretty-std-collections-hash.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
pretty-std-collections.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
pretty-std.rs Delete redundant gdb-version requirements and related comments 2024-08-18 16:58:25 -04:00
pretty-uninitialized-vec.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
range-types.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
rc_arc.rs Delete redundant gdb-version requirements and related comments 2024-08-18 16:58:25 -04:00
recursive-enum.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
recursive-struct.rs Delete redundant gdb-version requirements and related comments 2024-08-18 16:58:25 -04:00
reference-debuginfo.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
regression-bad-location-list-67992.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
result-types.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
rwlock-read.rs std: move Once implementations to sys 2024-03-12 15:41:06 +01:00
rwlock-write.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
self-in-default-method.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
self-in-generic-default-method.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
shadowed-argument.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
shadowed-variable.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
should-fail.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
simd.rs Replace gdbr with gdbg 2024-08-18 12:39:07 -04:00
simple-lexical-scope.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
simple-struct.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
simple-tuple.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
skip_second_statement_collapse.rs debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo] 2024-04-25 22:14:47 +03:00
skip_second_statement.rs debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo] 2024-04-25 22:14:47 +03:00
static-method-on-struct-and-enum.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
step-into-match.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
strings-and-strs.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
struct-in-enum.rs Delete redundant gdb-version requirements and related comments 2024-08-18 16:58:25 -04:00
struct-in-struct.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
struct-namespace.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
struct-style-enum.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
struct-with-destructor.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
text-to-include-1.txt
text-to-include-2.txt
text-to-include-3.txt
thread-names.rs Enable more debuginfo tests on Windows 2024-08-16 21:14:45 -04:00
thread.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
trait-pointers.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
tuple-in-struct.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
tuple-in-tuple.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
tuple-struct.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
tuple-style-enum.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
type-names.cdb.js
type-names.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
union-smoke.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
unique-enum.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
unit-type.rs Delete redundant gdb-version requirements and related comments 2024-08-18 16:58:25 -04:00
unreachable-locals.rs Delete min-lldb-version: 310 2024-08-18 16:58:26 -04:00
unsized.rs Replace gdbr with gdbg 2024-08-18 12:39:07 -04:00
var-captured-in-nested-closure.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
var-captured-in-sendable-closure.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
var-captured-in-stack-closure.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
vec-slices.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
vec.rs Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
zst-interferes-with-prologue.rs Don't leave debug locations for constants sitting on the builder indefinitely. 2024-09-06 23:12:18 +00:00