Conditionalize the use of DW_LANG_C_plus_plus_03 and DW_LANG_Rust
authorMark Wielaard <mark@klomp.org>
Thu, 17 Jan 2019 10:19:02 +0000 (11:19 +0100)
committerDodji Seketeli <dodji@redhat.com>
Thu, 17 Jan 2019 13:26:58 +0000 (14:26 +0100)
commit2366dca947478b0e69841337fcfec619a5edc0d9
tree5b38c16efffc1d95d9945527fa58f250c5814e69
parent7caaaa9f3de33372f158cbc3046bd864dff2e8f0
Conditionalize the use of DW_LANG_C_plus_plus_03 and DW_LANG_Rust

Older elfutils (pre-0.170) don't define these constants in dwarf.h so
don't use them in that case.

* include/abg-ir.h (LANG_C_plus_plus_03): Add this new language
enum to "enum translation_unit::language".
* src/abg-dwarf-reader.cc (dwarf_language_to_tu_language): Do not
use DW_LANG_Rust or DW_LANG_C_plus_plus_03 if these are not
defined.
(get_default_array_lower_bound): Handle the new
translation_unit::LANG_C_plus_plus_03 enumerator.

Signed-off-by: Mark Wielaard <mark@klomp.org>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
include/abg-ir.h
src/abg-dwarf-reader.cc