[llvm] [ADT] Add standalone_debug attribute to SmallVectorBase (PR #82527)

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 21 13:40:27 PST 2024


rnk wrote:

Thanks for the info!

I seem to recall that LLDB is not able to link up type information across DSO boundaries, so even though there is complete type information for `SmallVectorBase<unsigned int>` in LLVMSupport.so, LLDB may not be able to find it. I found some confirmation of this theory in [this github issue comment](https://github.com/llvm/llvm-project/issues/60994#issuecomment-1447337360) from @jimingham .

To test that theory, you could try doing a static build of LLVM (`BUILD_SHARED_LIBS=OFF`) or try using a monolithic LLVM DSO (`LLVM_BUILD_LLVM_DYLIB=ON`, I think) and compare results from those builds.

If this theory turns out to be correct, it's a bug in LLDB, and I think it would be reasonable to land this patch with some comments pointing to the specific bug being worked around. Alternatively, you can configure your build to use `-fstandalone-debug`, which is the default for Apple platforms. This will greatly increase debug size, but it's a more principled solution and there won't be any more wack-a-mole.

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


More information about the llvm-commits mailing list