
This patch works towards consolidating all Clang debug-info into the `clang/test/DebugInfo` directory (https://discourse.llvm.org/t/clang-test-location-of-clang-debug-info-tests/87958). Here we move only the `clang/test/CodeGen` tests. The list of files i came up with is: 1. searched for anything with `*debug-info*` in the filename 2. searched for occurrences of `debug-info-kind` in the tests I created a couple of subdirectories in `clang/test/DebugInfo` where I thought it made sense (mostly when the tests were target-specific). There's a couple of tests in `clang/test/CodeGen` that still set `-debug-info-kind`. They probably don't need to do that, but I'm not changing that as part of this PR.
18 lines
644 B
C
18 lines
644 B
C
// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone \
|
|
// RUN: -triple %itanium_abi_triple %s -o - | FileCheck %s
|
|
|
|
// Debug info for a global constant whose address is taken should be emitted
|
|
// exactly once.
|
|
|
|
// CHECK: @i = internal constant i32 1, align 4, !dbg ![[I:[0-9]+]]
|
|
// CHECK: ![[I]] = !DIGlobalVariableExpression(var: ![[VAR:.*]], expr: !DIExpression(DW_OP_constu, 1, DW_OP_stack_value))
|
|
// CHECK: ![[VAR]] = distinct !DIGlobalVariable(name: "i",
|
|
// CHECK: !DICompileUnit({{.*}}globals: ![[GLOBALS:[0-9]+]]
|
|
// CHECK: ![[GLOBALS]] = !{![[I]]}
|
|
static const int i = 1;
|
|
|
|
void g(const int *, int);
|
|
void f(void) {
|
|
g(&i, i);
|
|
}
|