[04/11] ir: Make odr_is_relevant support support artifacts with no TU set yet
Commit Message
From: Dodji Seketeli <dodji@redhat.com>
* src/abg-ir.cc (odr_is_relevant): Consider that an artifact with
no associated TU is not relevant for ODR considerations.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
src/abg-ir.cc | 3 +++
1 file changed, 3 insertions(+)
@@ -10070,6 +10070,9 @@ debug_comp_stack(const environment& env)
bool
odr_is_relevant(const type_or_decl_base& artifact)
{
+ if (!artifact.get_translation_unit())
+ return false;
+
translation_unit::language l =
artifact.get_translation_unit()->get_language();