Fix the build when GNU Source Highlight is not available
authorTom Tromey <tom@tromey.com>
Sat, 29 Dec 2018 04:07:24 +0000 (21:07 -0700)
committerTom Tromey <tom@tromey.com>
Sat, 29 Dec 2018 04:07:24 +0000 (21:07 -0700)
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.

gdb/ChangeLog
gdb/source-cache.c

index d14a09373df0c8cc59ca11c9e50ed5742e58f45a..5ed91a84fc3cbe66d121118d2c84b07edd65dbf8 100644 (file)
@@ -1,3 +1,7 @@
+2018-12-28  Tom Tromey  <tom@tromey.com>
+
+       * source-cache.c (get_language_name): Conditionally compile.
+
 2018-12-28  Tom Tromey  <tom@tromey.com>
 
        * jit.c (free_objfile_data): Only delete breakpoint if non-null.
index 56851806e441b5b14c18be0c2b472d13888c661a..f1715523b1736b6e6a9d99e857016ae9e6991aaa 100644 (file)
@@ -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
This page took 0.032469 seconds and 4 git commands to generate.