aboutsummaryrefslogtreecommitdiff
path: root/gdb/source-cache.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-12-28 21:07:24 -0700
committerTom Tromey <tom@tromey.com>2018-12-28 21:07:24 -0700
commit64c45143db4c550e19763edf97ca3441c78f9a05 (patch)
tree5fdfeb56a4a0e6f3de0092cae3330de86dfe35bb /gdb/source-cache.c
parentf9f981e5f64c3941ccae45c7a2911898eeade5cf (diff)
downloadgdb-64c45143db4c550e19763edf97ca3441c78f9a05.zip
gdb-64c45143db4c550e19763edf97ca3441c78f9a05.tar.gz
gdb-64c45143db4c550e19763edf97ca3441c78f9a05.tar.bz2
Fix the build when GNU Source Highlight is not available
The builder pointed out that, when GNU Source Highlight is not available, get_language_name is not used. This patch makes it conditional, fixing the build problem. gdb/ChangeLog 2018-12-28 Tom Tromey <tom@tromey.com> * source-cache.c (get_language_name): Conditionally compile.
Diffstat (limited to 'gdb/source-cache.c')
-rw-r--r--gdb/source-cache.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/source-cache.c b/gdb/source-cache.c
index 5685180..f171552 100644
--- a/gdb/source-cache.c
+++ b/gdb/source-cache.c
@@ -108,6 +108,8 @@ source_cache::extract_lines (const struct source_text &text, int first_line,
return false;
}
+#ifdef HAVE_SOURCE_HIGHLIGHT
+
/* Return the Source Highlight language name, given a gdb language
LANG. Returns NULL if the language is not known. */
@@ -160,6 +162,8 @@ get_language_name (enum language lang)
return nullptr;
}
+#endif /* HAVE_SOURCE_HIGHLIGHT */
+
/* See source-cache.h. */
bool