Commit ac19d38
authored
[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.1 parent dea86c6 commit ac19d38
File tree
5 files changed
+17
-19
lines changed- lldb
- source/Plugins/SymbolFile/DWARF
- unittests
- SymbolFile/DWARF
- Symbol
5 files changed
+17
-19
lines changedLines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3707 | 3707 | | |
3708 | 3708 | | |
3709 | 3709 | | |
3710 | | - | |
3711 | | - | |
3712 | | - | |
3713 | | - | |
3714 | | - | |
3715 | | - | |
| 3710 | + | |
| 3711 | + | |
| 3712 | + | |
| 3713 | + | |
3716 | 3714 | | |
3717 | 3715 | | |
3718 | 3716 | | |
| |||
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
| |||
264 | 269 | | |
265 | 270 | | |
266 | 271 | | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | 272 | | |
272 | 273 | | |
273 | 274 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1560 | 1560 | | |
1561 | 1561 | | |
1562 | 1562 | | |
1563 | | - | |
1564 | | - | |
| 1563 | + | |
| 1564 | + | |
1565 | 1565 | | |
1566 | 1566 | | |
1567 | 1567 | | |
1568 | 1568 | | |
1569 | 1569 | | |
1570 | 1570 | | |
1571 | 1571 | | |
1572 | | - | |
1573 | | - | |
| 1572 | + | |
| 1573 | + | |
1574 | 1574 | | |
1575 | 1575 | | |
1576 | 1576 | | |
| |||
1614 | 1614 | | |
1615 | 1615 | | |
1616 | 1616 | | |
1617 | | - | |
1618 | | - | |
| 1617 | + | |
1619 | 1618 | | |
1620 | 1619 | | |
1621 | 1620 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | | - | |
| 290 | + | |
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1257 | 1257 | | |
1258 | 1258 | | |
1259 | 1259 | | |
1260 | | - | |
| 1260 | + | |
1261 | 1261 | | |
1262 | 1262 | | |
1263 | 1263 | | |
| |||
1434 | 1434 | | |
1435 | 1435 | | |
1436 | 1436 | | |
1437 | | - | |
| 1437 | + | |
1438 | 1438 | | |
1439 | 1439 | | |
1440 | 1440 | | |
| |||
0 commit comments