[all-commits] [llvm/llvm-project] ac19d3: [lldb][DWARFASTParserClang] Complete and make use ...

Michael Buch via All-commits all-commits at lists.llvm.org
Tue Dec 2 16:50:03 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ac19d38e6f3f97ae920f71dc2618800f54668332
      https://github.com/llvm/llvm-project/commit/ac19d38e6f3f97ae920f71dc2618800f54668332
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2025-12-03 (Wed, 03 Dec 2025)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    M lldb/unittests/Symbol/TestClangASTImporter.cpp
    M lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp

  Log Message:
  -----------
  [lldb][DWARFASTParserClang] Complete and make use of LLVM's RTTI support (#170249)

We almost had RTTI support for `DWARFASTParserClang`, but because
`classof` was protected, using `llvm::cast`/etc. on it would fail to
compile with:
```
llvm/include/llvm/Support/Casting.h:64:57: error: 'classof' is a protected member of 'DWARFASTParserClang'
   64 |   static inline bool doit(const From &Val) { return To::classof(&Val); }
      |                                                         ^
llvm/include/llvm/Support/Casting.h:110:32: note: in instantiation of member function 'llvm::isa_impl<DWARFASTParserClang, lldb_private::plugin::dwarf::DWARFASTParser>::doit' requested here
  110 |     return isa_impl<To, From>::doit(*Val);
```

This patch makes `classof` public and turns `static_cast`s of
`DWARFASTParserClang` into `llvm::cast`s.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list