[clang][test] Location of Clang debug-info tests

Currently the Clang debug-info tests are spread across a couple of directories:

I see the reasoning behind putting debug-info tests into the CodeGendirectories since the debug-info generation lives in clang/lib/CodeGen, but should we centralize where the debug-info tests are? The clang/test/DebugInfo tests were recently introduced for the KeyInstructions work. It also aligns with where the LLVM debug-info tests live. How would people feel about moving the tests under that directory? And perhaps have CXX and ObjC subdirectories for language-specific debug-info generation. Is it worth the churn?

@OCHyams @dblaikie @adrian.prantl

1 Like

I think it would be reasonable to either have a DebugInfo subdirectory in each of the CodeGen folders or a CXX/ObjC/… subdirectory in tests/DebugInfo. Whether it’s worth the churn is mostly a question for the person volunteering to do the churning :wink:

1 Like

FWIW I think it would be a good idea to add a few more subdirectories in general. Having tons of tests in a single directory without any sort of hierarchy makes it really difficult to find tests.

2 Likes

FWIW, I’d be fine splitting those tests into their own DebugInfo directory; there’s plenty of tests that can live there and this makes them easier to find. I’m less certain about having language-specific directories though. That tends to get stale over time because language features migrate between languages (plenty of C++ features make it into C, in Clang most C features make it into C++ as extensions, etc).

1 Like

Sounds good! I’ll try to sift through the current tests and see if there are any subdirectories that would make sense. But maybe even just putting them all into DebugInfo for now is beneficial enough.

1 Like

Just to close the loop, I moved most of the debug-info tests into clang/test/DebugInfo (and subdirectories therein). Might’ve missed a couple here and there, but the vast majority should be there now. Not sure of a good way to enforce new tests to be put into clang/test/DebugInfo, but hopefully for new contributors, they’ll naturally look there.

Nice side-effect is that have a check-clang-debuginfo target now (mirroring the check-llvm-debuginfo target).

1 Like