[libcxx-commits] [libcxxabi] [llvm] [ItaniumDemangle][test] Turn ItaniumDemangle tests into LLVM unit-tests (PR #137947)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 6 04:13:48 PDT 2025


ldionne wrote:

> Yea that should work. Are you suggesting we put the test-cases in `libcxxabi/test/` next to `test_demangle.pass.cpp` and then adjust the `cp-to-llvm.sh` script to sync that file into the LLVM repo? Or should this file be distributed like other headers and LLVM would just reach into libcxxabi to include this file? From LLDB's perspective I would prefer the former, because libcxxabi isn't always a requirement to run the LLDB tests. So if we could have the file synced into LLVM that would work for us.

I'm neutral on this, both solutions would satisfy me. I don't know the constraints of LLDB and testing the LLVM variant of this code, so I can't weigh in on that.

> Also, if we have the tests in both `test_demangle.pass.cpp` _and_ LLVM, what should we do with the test-cases that test invalid inputs and floating point inputs. Those are currently separate test-cases in `test_demangle.pass.cpp`. Should we keep them in one place only? Or also factor out the test-cases into separate files and have tests for them in libc++abi _and_ LLVM?

In an ideal world, I think that if there's an easy way to also hoist these test cases into something that can be shared, then we would achieve maximal coverage and maximal reuse. But that might not be easy to do and it might not be worth it if doing so introduces a lot of complexity. On my end, I'd simply ask that we don't decrease the existing coverage in libc++abi.

https://github.com/llvm/llvm-project/pull/137947


More information about the libcxx-commits mailing list