[Lldb-commits] [lldb] [LLDB][NFC] Move CPlusPlusLanguage methods used in Core/Module.cpp to a separated module to break lldb-server dependencies (PR #132274)

Dmitry Vasilyev via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 4 04:33:35 PDT 2025


slydiman wrote:

@labath 

> I'm not sure what has changed. This code has been here since 2022, so I suspect it's one of those "perfectly reasonable" changes I mentioned earlier.

https://github.com/llvm/llvm-project/commit/d2a7a249c567cb170f22fe6e932896f9298b581d

Changed the definition of LLVM_ATTRIBUTE_RETAIN and LLVM_DUMP_METHOD

`ConstructionContextItem::getKindAsString` is marked as LLVM_DUMP_METHOD, where 
```
// FIXME: Move this to a private config.h as it's not usable in public headers.
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
#define LLVM_DUMP_METHOD                                                       \
  LLVM_ATTRIBUTE_NOINLINE LLVM_ATTRIBUTE_USED LLVM_ATTRIBUTE_RETAIN
#else
#define LLVM_DUMP_METHOD LLVM_ATTRIBUTE_NOINLINE
#endif
```
So, now `ConstructionContextItem::getKindAsString` is GC root for CommandObjectTarget.cpp

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


More information about the lldb-commits mailing list