aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2/cu.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/dwarf2/cu.h')
-rw-r--r--gdb/dwarf2/cu.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/dwarf2/cu.h b/gdb/dwarf2/cu.h
index 6b72ec2..23cb3d2 100644
--- a/gdb/dwarf2/cu.h
+++ b/gdb/dwarf2/cu.h
@@ -23,6 +23,7 @@
#include "buildsym.h"
#include "dwarf2/comp-unit-head.h"
#include "gdbsupport/gdb_optional.h"
+#include "language.h"
/* Type used for delaying computation of method physnames.
See comments for compute_delayed_physnames. */
@@ -105,6 +106,12 @@ struct dwarf2_cu
/* The language we are debugging. */
const struct language_defn *language_defn = nullptr;
+ enum language lang () const
+ {
+ gdb_assert (language_defn != language_def (language_unknown));
+ return language_defn->la_language;
+ }
+
const char *producer = nullptr;
private: