aboutsummaryrefslogtreecommitdiff
path: root/libctf/ctf-link.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2023-10-17 11:38:06 +0200
committerTom de Vries <tdevries@suse.de>2023-10-17 11:38:06 +0200
commit62dfd02e30e33be7b6acab5e2e50677d60b8ff8c (patch)
tree189175a08e2ae3f201942404c7c03c92cb7e4d4a /libctf/ctf-link.c
parent7e5649156720ec6c3aa5e2036b27811bc8195ab9 (diff)
downloadbinutils-62dfd02e30e33be7b6acab5e2e50677d60b8ff8c.zip
binutils-62dfd02e30e33be7b6acab5e2e50677d60b8ff8c.tar.gz
binutils-62dfd02e30e33be7b6acab5e2e50677d60b8ff8c.tar.bz2
[gdb/cli] Factor out try_source_highlight
Function source_cache::ensure contains some code using the GNU source-highlight library. The code is a sizable part of the function, and contains conditional compilation in a slightly convoluted way: ... if (!already_styled) #endif /* HAVE_SOURCE_HIGHLIGHT */ { ... Fix this by factoring out the code into new function try_source_highlight, such that: - source_cache::ensure is easier to read, and - the conditional compilation is at the level of the function body. Tested on x86_64-linux. Reviewed-By: Lancelot Six <lancelot.six@amd.com>
Diffstat (limited to 'libctf/ctf-link.c')
0 files changed, 0 insertions, 0 deletions