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

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 21 14:01:02 PST 2024


dwblaikie wrote:

Yep. That's about the size of it/can confirm that lldh can't do type lookup across dynamic library boundaries, so on Linux (or other platforms that default to -fno-standalone-debug, or anywhere you explicitly specify -fno-standalone-debug) lldb can't handle this common idiom (implemented by clang and gcc - well, gcc's homing is less aggressive than clangs in this specific example - but easy to construct others that it'd trigger on)

Workaround and a specific bug to track sounds good to me.

Hmm - unfortunate to add the workaround when it's only for lldb, but no way to make it conditional on lldb being the intended debugger. Given many other things will break (std::string printing with clang, I think, and iostreams with gcc or clang) - maybe just accept that shared library builds on linux with lldb are pretty broken & use -fstandalone-debug if you're targeting lldb (maybe use -glldb - I think that'll turn on that feature and others maybe?)

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


More information about the llvm-commits mailing list