[llvm-debuginfo-analyzer] Fix ODR violation in llvm::logicalview::LVObject (#140265)

Some data members are only part of a class definition in a Debug build,
e.g. `LVObject::ID`. If `debuginfologicalview` is used as a library,
`NDEBUG` cannot be used for this purpose, as this PP macro may have a
different definition in a downstream project, which in turn triggers an
ODR violation. Fix it by
- Making `LVObject::ID` an unconditional data member.
- Making `LVObject::dump()` non-virtual. Rationale: `virtual` is not
needed (and it calls `print()`, which is virtual anyway).

Fixes #139098.
This commit is contained in:
Javier Lopez-Gomez
2025-06-16 10:47:00 +02:00
committed by GitHub
parent 0952992ac6
commit 383b326879
10 changed files with 15 additions and 61 deletions

View File

@@ -676,8 +676,7 @@ INTERNAL
Typically these kind of options are available only in *debug* builds.
:program:`llvm-debuginfo-analyzer` supports these advanced options in
both *release* and *debug* builds, with the exception of the unique ID
that is generated only in *debug* builds.
both *release* and *debug* builds.
.. option:: --internal=<value[,value,...]>