From: Tom Tromey Date: Sat, 29 Dec 2018 04:07:24 +0000 (-0700) Subject: Fix the build when GNU Source Highlight is not available X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=64c45143db4c550e19763edf97ca3441c78f9a05;p=binutils-gdb.git 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 * source-cache.c (get_language_name): Conditionally compile. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d14a09373df..5ed91a84fc3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2018-12-28 Tom Tromey + + * source-cache.c (get_language_name): Conditionally compile. + 2018-12-28 Tom Tromey * jit.c (free_objfile_data): Only delete breakpoint if non-null. diff --git a/gdb/source-cache.c b/gdb/source-cache.c index 56851806e44..f1715523b17 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