Skip to content

Conversation

@Michael137
Copy link
Member

@Michael137 Michael137 commented Aug 19, 2025

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.

…nfo directory

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. I just searched for
anything with `*debug-info*` in the filename.
@llvmbot llvmbot added clang Clang issues not falling into any other category backend:AMDGPU backend:MIPS labels Aug 19, 2025
@llvmbot
Copy link
Member

llvmbot commented Aug 19, 2025

@llvm/pr-subscribers-backend-risc-v
@llvm/pr-subscribers-debuginfo
@llvm/pr-subscribers-backend-amdgpu
@llvm/pr-subscribers-clang

@llvm/pr-subscribers-backend-mips

Author: Michael Buch (Michael137)

Changes

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. I just searched for anything with *debug-info* in the filename.


Patch is 25.85 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/154311.diff

89 Files Affected:

  • (renamed) clang/test/DebugInfo/Generic/257-args.c ()
  • (renamed) clang/test/DebugInfo/Generic/Inputs/debug-info-embed-source.c ()
  • (renamed) clang/test/DebugInfo/Generic/Inputs/debug-info-file-checksum-line.cpp ()
  • (renamed) clang/test/DebugInfo/Generic/Inputs/debug-info-file-checksum-pre.cpp ()
  • (renamed) clang/test/DebugInfo/Generic/Inputs/debug-info-file-checksum.c ()
  • (renamed) clang/test/DebugInfo/Generic/Inputs/debug-info-macro.h ()
  • (renamed) clang/test/DebugInfo/Generic/Inputs/debug-info-slash.cpp ()
  • (renamed) clang/test/DebugInfo/Generic/Inputs/debug-info-slash.h ()
  • (renamed) clang/test/DebugInfo/Generic/abspath.c (+5-5)
  • (renamed) clang/test/DebugInfo/Generic/alias-pointer.c ()
  • (renamed) clang/test/DebugInfo/Generic/alias.c ()
  • (renamed) clang/test/DebugInfo/Generic/amdgpu-barrier-type-debug-info.c ()
  • (renamed) clang/test/DebugInfo/Generic/amdgpu-buffer-rsrc-type-debug-info.c ()
  • (renamed) clang/test/DebugInfo/Generic/args.c ()
  • (renamed) clang/test/DebugInfo/Generic/atomic.c ()
  • (renamed) clang/test/DebugInfo/Generic/attr-counted-by-debug-info.c ()
  • (renamed) clang/test/DebugInfo/Generic/attributed-stmt.c ()
  • (renamed) clang/test/DebugInfo/Generic/bitfield-0-struct.c ()
  • (renamed) clang/test/DebugInfo/Generic/block-decl.c ()
  • (renamed) clang/test/DebugInfo/Generic/block-expr.c ()
  • (renamed) clang/test/DebugInfo/Generic/block-out-return.c ()
  • (renamed) clang/test/DebugInfo/Generic/block-vars.c ()
  • (renamed) clang/test/DebugInfo/Generic/block.c ()
  • (renamed) clang/test/DebugInfo/Generic/bpf-debug-info-extern-func.c ()
  • (renamed) clang/test/DebugInfo/Generic/bpf-debug-info-unref.c ()
  • (renamed) clang/test/DebugInfo/Generic/cc.c ()
  • (renamed) clang/test/DebugInfo/Generic/codeview-buildinfo.c (+1-1)
  • (renamed) clang/test/DebugInfo/Generic/codeview-heapallocsite.c ()
  • (renamed) clang/test/DebugInfo/Generic/codeview-unnamed.c ()
  • (renamed) clang/test/DebugInfo/Generic/compilation-dir.c (+3-3)
  • (renamed) clang/test/DebugInfo/Generic/crash.c ()
  • (renamed) clang/test/DebugInfo/Generic/debug-info.c ()
  • (renamed) clang/test/DebugInfo/Generic/embed-source.c ()
  • (renamed) clang/test/DebugInfo/Generic/enum-case-val.c ()
  • (renamed) clang/test/DebugInfo/Generic/enum-extensibility.c ()
  • (renamed) clang/test/DebugInfo/Generic/enum.c ()
  • (renamed) clang/test/DebugInfo/Generic/enum.cpp ()
  • (renamed) clang/test/DebugInfo/Generic/extern-basic.c ()
  • (renamed) clang/test/DebugInfo/Generic/extern-basic.cpp ()
  • (renamed) clang/test/DebugInfo/Generic/extern-call.c ()
  • (renamed) clang/test/DebugInfo/Generic/extern-callback.c ()
  • (renamed) clang/test/DebugInfo/Generic/extern-duplicate.c ()
  • (renamed) clang/test/DebugInfo/Generic/extern-multi.c ()
  • (renamed) clang/test/DebugInfo/Generic/extern-unused.c ()
  • (renamed) clang/test/DebugInfo/Generic/file-change.c ()
  • (renamed) clang/test/DebugInfo/Generic/file-checksum.c ()
  • (renamed) clang/test/DebugInfo/Generic/gline-tables-only.c ()
  • (renamed) clang/test/DebugInfo/Generic/gline-tables-only2.c ()
  • (renamed) clang/test/DebugInfo/Generic/global-constant.c ()
  • (renamed) clang/test/DebugInfo/Generic/imported-entity.cpp (+1-1)
  • (renamed) clang/test/DebugInfo/Generic/inline-for.c ()
  • (renamed) clang/test/DebugInfo/Generic/limited.c ()
  • (renamed) clang/test/DebugInfo/Generic/line.c ()
  • (renamed) clang/test/DebugInfo/Generic/line2.c ()
  • (renamed) clang/test/DebugInfo/Generic/line3.c ()
  • (renamed) clang/test/DebugInfo/Generic/line4.c ()
  • (renamed) clang/test/DebugInfo/Generic/lto.c ()
  • (renamed) clang/test/DebugInfo/Generic/macro.c (+1-1)
  • (renamed) clang/test/DebugInfo/Generic/matrix-types.c ()
  • (renamed) clang/test/DebugInfo/Generic/member.c ()
  • (renamed) clang/test/DebugInfo/Generic/mips-debug-info-bitfield.c ()
  • (renamed) clang/test/DebugInfo/Generic/names.c ()
  • (renamed) clang/test/DebugInfo/Generic/no-inline-line-tables.c ()
  • (renamed) clang/test/DebugInfo/Generic/null-sanitizer-debug-info-regression.cpp ()
  • (renamed) clang/test/DebugInfo/Generic/oslog.c ()
  • (renamed) clang/test/DebugInfo/Generic/packed-struct.c ()
  • (renamed) clang/test/DebugInfo/Generic/preferred-type.cpp ()
  • (renamed) clang/test/DebugInfo/Generic/preprocessed-file.i ()
  • (renamed) clang/test/DebugInfo/Generic/programming-language.c ()
  • (renamed) clang/test/DebugInfo/Generic/pseudo-probe.cpp ()
  • (renamed) clang/test/DebugInfo/Generic/ranges-base-address.c ()
  • (renamed) clang/test/DebugInfo/Generic/same-line.c ()
  • (renamed) clang/test/DebugInfo/Generic/scope-file.c ()
  • (renamed) clang/test/DebugInfo/Generic/scope.c ()
  • (renamed) clang/test/DebugInfo/Generic/slash.c (+2-2)
  • (renamed) clang/test/DebugInfo/Generic/slash.test ()
  • (renamed) clang/test/DebugInfo/Generic/static-const-fp.c ()
  • (renamed) clang/test/DebugInfo/Generic/static.c ()
  • (renamed) clang/test/DebugInfo/Generic/switch-fallthrough.c ()
  • (renamed) clang/test/DebugInfo/Generic/sysroot-sdk.c ()
  • (renamed) clang/test/DebugInfo/Generic/typedef.c ()
  • (renamed) clang/test/DebugInfo/Generic/unused-types.c ()
  • (renamed) clang/test/DebugInfo/Generic/unused-types.cpp ()
  • (renamed) clang/test/DebugInfo/Generic/variables.c ()
  • (renamed) clang/test/DebugInfo/Generic/vector-bool.c ()
  • (renamed) clang/test/DebugInfo/Generic/vector.c ()
  • (renamed) clang/test/DebugInfo/Generic/version-coff.c ()
  • (renamed) clang/test/DebugInfo/Generic/version.c ()
  • (renamed) clang/test/DebugInfo/Generic/vla.c ()
diff --git a/clang/test/CodeGen/debug-info-257-args.c b/clang/test/DebugInfo/Generic/257-args.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-257-args.c
rename to clang/test/DebugInfo/Generic/257-args.c
diff --git a/clang/test/CodeGen/Inputs/debug-info-embed-source.c b/clang/test/DebugInfo/Generic/Inputs/debug-info-embed-source.c
similarity index 100%
rename from clang/test/CodeGen/Inputs/debug-info-embed-source.c
rename to clang/test/DebugInfo/Generic/Inputs/debug-info-embed-source.c
diff --git a/clang/test/CodeGen/Inputs/debug-info-file-checksum-line.cpp b/clang/test/DebugInfo/Generic/Inputs/debug-info-file-checksum-line.cpp
similarity index 100%
rename from clang/test/CodeGen/Inputs/debug-info-file-checksum-line.cpp
rename to clang/test/DebugInfo/Generic/Inputs/debug-info-file-checksum-line.cpp
diff --git a/clang/test/CodeGen/Inputs/debug-info-file-checksum-pre.cpp b/clang/test/DebugInfo/Generic/Inputs/debug-info-file-checksum-pre.cpp
similarity index 100%
rename from clang/test/CodeGen/Inputs/debug-info-file-checksum-pre.cpp
rename to clang/test/DebugInfo/Generic/Inputs/debug-info-file-checksum-pre.cpp
diff --git a/clang/test/CodeGen/Inputs/debug-info-file-checksum.c b/clang/test/DebugInfo/Generic/Inputs/debug-info-file-checksum.c
similarity index 100%
rename from clang/test/CodeGen/Inputs/debug-info-file-checksum.c
rename to clang/test/DebugInfo/Generic/Inputs/debug-info-file-checksum.c
diff --git a/clang/test/CodeGen/Inputs/debug-info-macro.h b/clang/test/DebugInfo/Generic/Inputs/debug-info-macro.h
similarity index 100%
rename from clang/test/CodeGen/Inputs/debug-info-macro.h
rename to clang/test/DebugInfo/Generic/Inputs/debug-info-macro.h
diff --git a/clang/test/CodeGen/Inputs/debug-info-slash.cpp b/clang/test/DebugInfo/Generic/Inputs/debug-info-slash.cpp
similarity index 100%
rename from clang/test/CodeGen/Inputs/debug-info-slash.cpp
rename to clang/test/DebugInfo/Generic/Inputs/debug-info-slash.cpp
diff --git a/clang/test/CodeGen/Inputs/debug-info-slash.h b/clang/test/DebugInfo/Generic/Inputs/debug-info-slash.h
similarity index 100%
rename from clang/test/CodeGen/Inputs/debug-info-slash.h
rename to clang/test/DebugInfo/Generic/Inputs/debug-info-slash.h
diff --git a/clang/test/CodeGen/debug-info-abspath.c b/clang/test/DebugInfo/Generic/abspath.c
similarity index 70%
rename from clang/test/CodeGen/debug-info-abspath.c
rename to clang/test/DebugInfo/Generic/abspath.c
index 193a72c0a66fd..95bed45518f2b 100644
--- a/clang/test/CodeGen/debug-info-abspath.c
+++ b/clang/test/DebugInfo/Generic/abspath.c
@@ -1,9 +1,9 @@
 // RUN: mkdir -p %t/UNIQUEISH_SENTINEL
-// RUN: cp %s %t/UNIQUEISH_SENTINEL/debug-info-abspath.c
+// RUN: cp %s %t/UNIQUEISH_SENTINEL/abspath.c
 
 // RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \
-// RUN:   -fdebug-compilation-dir=%t/UNIQUEISH_SENTINEL/debug-info-abspath.c \
-// RUN:   %t/UNIQUEISH_SENTINEL/debug-info-abspath.c -emit-llvm -o - \
+// RUN:   -fdebug-compilation-dir=%t/UNIQUEISH_SENTINEL/abspath.c \
+// RUN:   %t/UNIQUEISH_SENTINEL/abspath.c -emit-llvm -o - \
 // RUN:   | FileCheck %s
 
 // RUN: cp %s %t.c
@@ -18,8 +18,8 @@ void foo(void) {}
 
 // CHECK: = distinct !DISubprogram({{.*}}file: ![[SPFILE:[0-9]+]]
 // CHECK: ![[SPFILE]] = !DIFile(filename: "{{.*}}UNIQUEISH_SENTINEL
-// CHECK-SAME:                  debug-info-abspath.c"
+// CHECK-SAME:                  abspath.c"
 // CHECK-NOT:                   directory: "{{.*}}UNIQUEISH_SENTINEL
 
 // INTREE: = distinct !DISubprogram({{.*}}![[SPFILE:[0-9]+]]
-// INTREE: DIFile({{.*}}directory: "{{.+}}CodeGen{{.*}}")
+// INTREE: DIFile({{.*}}directory: "{{.+}}Generic{{.*}}")
diff --git a/clang/test/CodeGen/debug-info-alias-pointer.c b/clang/test/DebugInfo/Generic/alias-pointer.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-alias-pointer.c
rename to clang/test/DebugInfo/Generic/alias-pointer.c
diff --git a/clang/test/CodeGen/debug-info-alias.c b/clang/test/DebugInfo/Generic/alias.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-alias.c
rename to clang/test/DebugInfo/Generic/alias.c
diff --git a/clang/test/CodeGen/amdgpu-barrier-type-debug-info.c b/clang/test/DebugInfo/Generic/amdgpu-barrier-type-debug-info.c
similarity index 100%
rename from clang/test/CodeGen/amdgpu-barrier-type-debug-info.c
rename to clang/test/DebugInfo/Generic/amdgpu-barrier-type-debug-info.c
diff --git a/clang/test/CodeGen/amdgpu-buffer-rsrc-type-debug-info.c b/clang/test/DebugInfo/Generic/amdgpu-buffer-rsrc-type-debug-info.c
similarity index 100%
rename from clang/test/CodeGen/amdgpu-buffer-rsrc-type-debug-info.c
rename to clang/test/DebugInfo/Generic/amdgpu-buffer-rsrc-type-debug-info.c
diff --git a/clang/test/CodeGen/debug-info-args.c b/clang/test/DebugInfo/Generic/args.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-args.c
rename to clang/test/DebugInfo/Generic/args.c
diff --git a/clang/test/CodeGen/debug-info-atomic.c b/clang/test/DebugInfo/Generic/atomic.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-atomic.c
rename to clang/test/DebugInfo/Generic/atomic.c
diff --git a/clang/test/CodeGen/attr-counted-by-debug-info.c b/clang/test/DebugInfo/Generic/attr-counted-by-debug-info.c
similarity index 100%
rename from clang/test/CodeGen/attr-counted-by-debug-info.c
rename to clang/test/DebugInfo/Generic/attr-counted-by-debug-info.c
diff --git a/clang/test/CodeGen/debug-info-attributed-stmt.c b/clang/test/DebugInfo/Generic/attributed-stmt.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-attributed-stmt.c
rename to clang/test/DebugInfo/Generic/attributed-stmt.c
diff --git a/clang/test/CodeGen/debug-info-bitfield-0-struct.c b/clang/test/DebugInfo/Generic/bitfield-0-struct.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-bitfield-0-struct.c
rename to clang/test/DebugInfo/Generic/bitfield-0-struct.c
diff --git a/clang/test/CodeGen/debug-info-block-decl.c b/clang/test/DebugInfo/Generic/block-decl.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-block-decl.c
rename to clang/test/DebugInfo/Generic/block-decl.c
diff --git a/clang/test/CodeGen/debug-info-block-expr.c b/clang/test/DebugInfo/Generic/block-expr.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-block-expr.c
rename to clang/test/DebugInfo/Generic/block-expr.c
diff --git a/clang/test/CodeGen/debug-info-block-out-return.c b/clang/test/DebugInfo/Generic/block-out-return.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-block-out-return.c
rename to clang/test/DebugInfo/Generic/block-out-return.c
diff --git a/clang/test/CodeGen/debug-info-block-vars.c b/clang/test/DebugInfo/Generic/block-vars.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-block-vars.c
rename to clang/test/DebugInfo/Generic/block-vars.c
diff --git a/clang/test/CodeGen/debug-info-block.c b/clang/test/DebugInfo/Generic/block.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-block.c
rename to clang/test/DebugInfo/Generic/block.c
diff --git a/clang/test/CodeGen/bpf-debug-info-extern-func.c b/clang/test/DebugInfo/Generic/bpf-debug-info-extern-func.c
similarity index 100%
rename from clang/test/CodeGen/bpf-debug-info-extern-func.c
rename to clang/test/DebugInfo/Generic/bpf-debug-info-extern-func.c
diff --git a/clang/test/CodeGen/bpf-debug-info-unref.c b/clang/test/DebugInfo/Generic/bpf-debug-info-unref.c
similarity index 100%
rename from clang/test/CodeGen/bpf-debug-info-unref.c
rename to clang/test/DebugInfo/Generic/bpf-debug-info-unref.c
diff --git a/clang/test/CodeGen/debug-info-cc.c b/clang/test/DebugInfo/Generic/cc.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-cc.c
rename to clang/test/DebugInfo/Generic/cc.c
diff --git a/clang/test/CodeGen/debug-info-codeview-buildinfo.c b/clang/test/DebugInfo/Generic/codeview-buildinfo.c
similarity index 97%
rename from clang/test/CodeGen/debug-info-codeview-buildinfo.c
rename to clang/test/DebugInfo/Generic/codeview-buildinfo.c
index 98d249be8c883..ee6f772944d84 100644
--- a/clang/test/CodeGen/debug-info-codeview-buildinfo.c
+++ b/clang/test/DebugInfo/Generic/codeview-buildinfo.c
@@ -17,7 +17,7 @@ int main(void) { return 42; }
 // CHECK:                       Types (.debug$T)
 // CHECK: ============================================================
 // CHECK: 0x[[PWD:.+]] | LF_STRING_ID [size = {{.+}}] ID: <no type>, String: [[PWDVAL:.+]]
-// CHECK: 0x[[FILEPATH:.+]] | LF_STRING_ID [size = {{.+}}] ID: <no type>, String: [[FILEPATHVAL:.+[\\/]debug-info-codeview-buildinfo.c]]
+// CHECK: 0x[[FILEPATH:.+]] | LF_STRING_ID [size = {{.+}}] ID: <no type>, String: [[FILEPATHVAL:.+[\\/]codeview-buildinfo.c]]
 // CHECK: 0x[[ZIPDB:.+]] | LF_STRING_ID [size = {{.+}}] ID: <no type>, String:
 // CHECK: 0x[[TOOL:.+]] | LF_STRING_ID [size = {{.+}}] ID: <no type>, String: [[TOOLVAL:.+[\\/][clang|llvm].*]]
 // CHECK: 0x[[CMDLINE:.+]] | LF_STRING_ID [size = {{.+}}] ID: <no type>, String: "-cc1
diff --git a/clang/test/CodeGen/debug-info-codeview-heapallocsite.c b/clang/test/DebugInfo/Generic/codeview-heapallocsite.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-codeview-heapallocsite.c
rename to clang/test/DebugInfo/Generic/codeview-heapallocsite.c
diff --git a/clang/test/CodeGen/debug-info-codeview-unnamed.c b/clang/test/DebugInfo/Generic/codeview-unnamed.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-codeview-unnamed.c
rename to clang/test/DebugInfo/Generic/codeview-unnamed.c
diff --git a/clang/test/CodeGen/debug-info-compilation-dir.c b/clang/test/DebugInfo/Generic/compilation-dir.c
similarity index 79%
rename from clang/test/CodeGen/debug-info-compilation-dir.c
rename to clang/test/DebugInfo/Generic/compilation-dir.c
index 5f5542c525495..d2c19f298ec72 100644
--- a/clang/test/CodeGen/debug-info-compilation-dir.c
+++ b/clang/test/DebugInfo/Generic/compilation-dir.c
@@ -5,12 +5,12 @@
 // CHECK-NONSENSE: nonsense
 
 // RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck -check-prefix=CHECK-DIR %s
-// CHECK-DIR: CodeGen
+// CHECK-DIR: Generic
 
 /// Test path remapping.
 // RUN: %clang_cc1 -fdebug-compilation-dir=%S -main-file-name %s -emit-llvm -debug-info-kind=limited %s -o - | FileCheck -check-prefix=CHECK-ABS %s
-// CHECK-ABS: DIFile(filename: "{{.*}}debug-info-compilation-dir.c", directory: "{{.*}}CodeGen")
+// CHECK-ABS: DIFile(filename: "{{.*}}compilation-dir.c", directory: "{{.*}}Generic")
 
 // RUN: %clang_cc1 -main-file-name %s -emit-llvm -debug-info-kind=limited %s -o - | FileCheck -check-prefix=CHECK-NOMAP %s
-// CHECK-NOMAP: DIFile(filename: "{{.*}}debug-info-compilation-dir.c", directory: "")
+// CHECK-NOMAP: DIFile(filename: "{{.*}}compilation-dir.c", directory: "")
 
diff --git a/clang/test/CodeGen/debug-info-crash.c b/clang/test/DebugInfo/Generic/crash.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-crash.c
rename to clang/test/DebugInfo/Generic/crash.c
diff --git a/clang/test/CodeGen/debug-info.c b/clang/test/DebugInfo/Generic/debug-info.c
similarity index 100%
rename from clang/test/CodeGen/debug-info.c
rename to clang/test/DebugInfo/Generic/debug-info.c
diff --git a/clang/test/CodeGen/debug-info-embed-source.c b/clang/test/DebugInfo/Generic/embed-source.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-embed-source.c
rename to clang/test/DebugInfo/Generic/embed-source.c
diff --git a/clang/test/CodeGen/debug-info-enum-case-val.c b/clang/test/DebugInfo/Generic/enum-case-val.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-enum-case-val.c
rename to clang/test/DebugInfo/Generic/enum-case-val.c
diff --git a/clang/test/CodeGen/debug-info-enum-extensibility.c b/clang/test/DebugInfo/Generic/enum-extensibility.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-enum-extensibility.c
rename to clang/test/DebugInfo/Generic/enum-extensibility.c
diff --git a/clang/test/CodeGen/debug-info-enum.c b/clang/test/DebugInfo/Generic/enum.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-enum.c
rename to clang/test/DebugInfo/Generic/enum.c
diff --git a/clang/test/CodeGen/debug-info-enum.cpp b/clang/test/DebugInfo/Generic/enum.cpp
similarity index 100%
rename from clang/test/CodeGen/debug-info-enum.cpp
rename to clang/test/DebugInfo/Generic/enum.cpp
diff --git a/clang/test/CodeGen/debug-info-extern-basic.c b/clang/test/DebugInfo/Generic/extern-basic.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-extern-basic.c
rename to clang/test/DebugInfo/Generic/extern-basic.c
diff --git a/clang/test/CodeGen/debug-info-extern-basic.cpp b/clang/test/DebugInfo/Generic/extern-basic.cpp
similarity index 100%
rename from clang/test/CodeGen/debug-info-extern-basic.cpp
rename to clang/test/DebugInfo/Generic/extern-basic.cpp
diff --git a/clang/test/CodeGen/debug-info-extern-call.c b/clang/test/DebugInfo/Generic/extern-call.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-extern-call.c
rename to clang/test/DebugInfo/Generic/extern-call.c
diff --git a/clang/test/CodeGen/debug-info-extern-callback.c b/clang/test/DebugInfo/Generic/extern-callback.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-extern-callback.c
rename to clang/test/DebugInfo/Generic/extern-callback.c
diff --git a/clang/test/CodeGen/debug-info-extern-duplicate.c b/clang/test/DebugInfo/Generic/extern-duplicate.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-extern-duplicate.c
rename to clang/test/DebugInfo/Generic/extern-duplicate.c
diff --git a/clang/test/CodeGen/debug-info-extern-multi.c b/clang/test/DebugInfo/Generic/extern-multi.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-extern-multi.c
rename to clang/test/DebugInfo/Generic/extern-multi.c
diff --git a/clang/test/CodeGen/debug-info-extern-unused.c b/clang/test/DebugInfo/Generic/extern-unused.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-extern-unused.c
rename to clang/test/DebugInfo/Generic/extern-unused.c
diff --git a/clang/test/CodeGen/debug-info-file-change.c b/clang/test/DebugInfo/Generic/file-change.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-file-change.c
rename to clang/test/DebugInfo/Generic/file-change.c
diff --git a/clang/test/CodeGen/debug-info-file-checksum.c b/clang/test/DebugInfo/Generic/file-checksum.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-file-checksum.c
rename to clang/test/DebugInfo/Generic/file-checksum.c
diff --git a/clang/test/CodeGen/debug-info-gline-tables-only.c b/clang/test/DebugInfo/Generic/gline-tables-only.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-gline-tables-only.c
rename to clang/test/DebugInfo/Generic/gline-tables-only.c
diff --git a/clang/test/CodeGen/debug-info-gline-tables-only2.c b/clang/test/DebugInfo/Generic/gline-tables-only2.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-gline-tables-only2.c
rename to clang/test/DebugInfo/Generic/gline-tables-only2.c
diff --git a/clang/test/CodeGen/debug-info-global-constant.c b/clang/test/DebugInfo/Generic/global-constant.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-global-constant.c
rename to clang/test/DebugInfo/Generic/global-constant.c
diff --git a/clang/test/CodeGen/debug-info-imported-entity.cpp b/clang/test/DebugInfo/Generic/imported-entity.cpp
similarity index 87%
rename from clang/test/CodeGen/debug-info-imported-entity.cpp
rename to clang/test/DebugInfo/Generic/imported-entity.cpp
index 398536e581aea..f4763c14bbc7b 100644
--- a/clang/test/CodeGen/debug-info-imported-entity.cpp
+++ b/clang/test/DebugInfo/Generic/imported-entity.cpp
@@ -7,4 +7,4 @@ using std::A; using ::A;
 // CHECK: [[Imports]] = !{[[ImportedEntity:![0-9]+]]}
 // CHECK: [[ImportedEntity]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[CompileUnit]], entity: [[STDA:![0-9]+]], file: [[FILE:![0-9]+]], line: 4)
 // CHECK: [[STDA]] = !DICompositeType(tag: DW_TAG_class_type, name: "A",
-// CHECK: [[FILE]] = !DIFile(filename: {{.*}}debug-info-imported-entity.cpp
+// CHECK: [[FILE]] = !DIFile(filename: {{.*}}imported-entity.cpp
diff --git a/clang/test/CodeGen/debug-info-inline-for.c b/clang/test/DebugInfo/Generic/inline-for.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-inline-for.c
rename to clang/test/DebugInfo/Generic/inline-for.c
diff --git a/clang/test/CodeGen/debug-info-limited.c b/clang/test/DebugInfo/Generic/limited.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-limited.c
rename to clang/test/DebugInfo/Generic/limited.c
diff --git a/clang/test/CodeGen/debug-info-line.c b/clang/test/DebugInfo/Generic/line.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-line.c
rename to clang/test/DebugInfo/Generic/line.c
diff --git a/clang/test/CodeGen/debug-info-line2.c b/clang/test/DebugInfo/Generic/line2.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-line2.c
rename to clang/test/DebugInfo/Generic/line2.c
diff --git a/clang/test/CodeGen/debug-info-line3.c b/clang/test/DebugInfo/Generic/line3.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-line3.c
rename to clang/test/DebugInfo/Generic/line3.c
diff --git a/clang/test/CodeGen/debug-info-line4.c b/clang/test/DebugInfo/Generic/line4.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-line4.c
rename to clang/test/DebugInfo/Generic/line4.c
diff --git a/clang/test/CodeGen/debug-info-lto.c b/clang/test/DebugInfo/Generic/lto.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-lto.c
rename to clang/test/DebugInfo/Generic/lto.c
diff --git a/clang/test/CodeGen/debug-info-macro.c b/clang/test/DebugInfo/Generic/macro.c
similarity index 98%
rename from clang/test/CodeGen/debug-info-macro.c
rename to clang/test/DebugInfo/Generic/macro.c
index 23fd67515e845..de8d1ab915d7e 100644
--- a/clang/test/CodeGen/debug-info-macro.c
+++ b/clang/test/DebugInfo/Generic/macro.c
@@ -30,7 +30,7 @@
 // PCH:    [[Macros]] = !{[[MainMacroFile:![0-9]+]], [[DefineC1:![0-9]+]], [[DefineA:![0-9]+]], [[UndefC1:![0-9]+]]}
 
 // CHECK:  [[MainMacroFile]] = !DIMacroFile(file: [[MainFile:![0-9]+]], nodes: [[N1:![0-9]+]])
-// CHECK:  [[MainFile]] = !DIFile(filename: "{{.*}}debug-info-macro.c"
+// CHECK:  [[MainFile]] = !DIFile(filename: "{{.*}}macro.c"
 // CHECK:  [[N1]] = !{[[CommandLineInclude:![0-9]+]], [[DefineD1:![0-9]+]], [[FileInclude1:![0-9]+]], [[UndefD1:![0-9]+]], [[DefineD2:![0-9]+]], [[FileInclude2:![0-9]+]], [[UndefD2:![0-9]+]]}
 
 // CHECK:  [[CommandLineInclude]] = !DIMacroFile(file: [[HeaderFile:![0-9]+]], nodes: [[N2:![0-9]+]])
diff --git a/clang/test/CodeGen/debug-info-matrix-types.c b/clang/test/DebugInfo/Generic/matrix-types.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-matrix-types.c
rename to clang/test/DebugInfo/Generic/matrix-types.c
diff --git a/clang/test/CodeGen/debug-info-member.c b/clang/test/DebugInfo/Generic/member.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-member.c
rename to clang/test/DebugInfo/Generic/member.c
diff --git a/clang/test/CodeGen/mips-debug-info-bitfield.c b/clang/test/DebugInfo/Generic/mips-debug-info-bitfield.c
similarity index 100%
rename from clang/test/CodeGen/mips-debug-info-bitfield.c
rename to clang/test/DebugInfo/Generic/mips-debug-info-bitfield.c
diff --git a/clang/test/CodeGen/debug-info-names.c b/clang/test/DebugInfo/Generic/names.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-names.c
rename to clang/test/DebugInfo/Generic/names.c
diff --git a/clang/test/CodeGen/debug-info-no-inline-line-tables.c b/clang/test/DebugInfo/Generic/no-inline-line-tables.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-no-inline-line-tables.c
rename to clang/test/DebugInfo/Generic/no-inline-line-tables.c
diff --git a/clang/test/CodeGen/null-sanitizer-debug-info-regression.cpp b/clang/test/DebugInfo/Generic/null-sanitizer-debug-info-regression.cpp
similarity index 100%
rename from clang/test/CodeGen/null-sanitizer-debug-info-regression.cpp
rename to clang/test/DebugInfo/Generic/null-sanitizer-debug-info-regression.cpp
diff --git a/clang/test/CodeGen/debug-info-oslog.c b/clang/test/DebugInfo/Generic/oslog.c
similarity index 100%
rename from clang/test/CodeGen/debug-info-oslog.c
rename to clang/test/DebugInfo/Generic/oslog.c
diff --git a/clang/test/CodeGen/debug-info-packed-struct.c b/clang/test/DebugInfo/Generic/packed-struct.c
similarity i...
[truncated]

@dwblaikie
Copy link
Collaborator

Any chance of stripping the debug/debug-info prefixes from the file names, now that they'll b ein a DebugInfo directory?

@Michael137
Copy link
Member Author

Any chance of stripping the debug/debug-info prefixes from the file names, now that they'll b ein a DebugInfo directory?

I did for most of them :)

Let me check if there are any left

@Michael137
Copy link
Member Author

Removed the debug-* prefix from the tests where it made sense

Copy link
Collaborator

@dwblaikie dwblaikie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel strongly about the goal/where these tests should live, but seems a fine implementation of said goal.

@Michael137 Michael137 merged commit 3f3bc48 into llvm:main Aug 19, 2025
9 checks passed
@Michael137 Michael137 deleted the clang/move-debug-info-tests-codegen branch August 19, 2025 17:25
Michael137 added a commit to swiftlang/llvm-project that referenced this pull request Nov 4, 2025
…nfo directory (llvm#154311)

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.

(cherry picked from commit 3f3bc48)
Michael137 added a commit to swiftlang/llvm-project that referenced this pull request Nov 5, 2025
…nfo directory (llvm#154311)

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.

(cherry picked from commit 3f3bc48)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend:AMDGPU backend:MIPS backend:RISC-V clang Clang issues not falling into any other category debuginfo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants