Discussion thread: https://lists.llvm.org/pipermail/llvm-dev/2021-January/148048.html Move debuginfo-test into a subdirectory of a new top-level directory, called cross-project-tests. The new name replaces "debuginfo-test" as an LLVM project enabled via LLVM_ENABLE_PROJECTS. Differential Revision: https://reviews.llvm.org/D95339 Reviewed by: aprantl
24 lines
584 B
C
24 lines
584 B
C
// This test case verifies the debug location for variable-length arrays.
|
|
// REQUIRES: lldb
|
|
// UNSUPPORTED: system-windows
|
|
//
|
|
// RUN: %dexter --fail-lt 1.0 -w \
|
|
// RUN: --builder clang-c --debugger 'lldb' --cflags "-O0 -glldb" -- %s
|
|
|
|
void init_vla(int size) {
|
|
int i;
|
|
int vla[size];
|
|
for (i = 0; i < size; i++)
|
|
vla[i] = size-i;
|
|
vla[0] = size; // DexLabel('end_init')
|
|
}
|
|
|
|
int main(int argc, const char **argv) {
|
|
init_vla(23);
|
|
return 0;
|
|
}
|
|
|
|
// DexExpectWatchValue('vla[0]', '23', on_line=ref('end_init'))
|
|
// DexExpectWatchValue('vla[1]', '22', on_line=ref('end_init'))
|
|
|