diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2024-05-30 16:22:37 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2024-05-30 16:22:37 -0400 |
commit | 002310d77de404189b80ff4b951b7dd27152fa71 (patch) | |
tree | e72457f7075e32cde940c3cda0901a26d54ca5ce | |
parent | 4a7d71687676a1c36326e71f0a783fccb8748127 (diff) | |
download | binutils-002310d77de404189b80ff4b951b7dd27152fa71.zip binutils-002310d77de404189b80ff4b951b7dd27152fa71.tar.gz binutils-002310d77de404189b80ff4b951b7dd27152fa71.tar.bz2 |
gdb: add IWYU export pragams to gdb_curses.h
It seems like gdb_curses.h is included whenever we want to access
ncurses functionality, instead of including directly ncurses.h. As a
result, clangd often erroneously shows that gdb_curses.h inclusions are
unused.
By adding those pragmas, clangd (and the include-what-you-use tool)
understands that gdb_curses.h is a valid provider for whatever these
ncurses.h files provide.
Change-Id: Ia8acd761dae1577f7151d5fb558f35514b4e4ea2
-rw-r--r-- | gdb/gdb_curses.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/gdb_curses.h b/gdb/gdb_curses.h index c7ee862..8eb2e8c 100644 --- a/gdb/gdb_curses.h +++ b/gdb/gdb_curses.h @@ -40,21 +40,21 @@ #define NCURSES_NOMACROS #if defined (HAVE_NCURSESW_NCURSES_H) -#include <ncursesw/ncurses.h> +#include <ncursesw/ncurses.h> /* IWYU pragma: export */ #elif defined (HAVE_NCURSES_NCURSES_H) -#include <ncurses/ncurses.h> +#include <ncurses/ncurses.h> /* IWYU pragma: export */ #elif defined (HAVE_NCURSES_H) -#include <ncurses.h> +#include <ncurses.h> /* IWYU pragma: export */ #elif defined (HAVE_CURSESX_H) -#include <cursesX.h> +#include <cursesX.h> /* IWYU pragma: export */ #elif defined (HAVE_CURSES_H) -#include <curses.h> +#include <curses.h> /* IWYU pragma: export */ #endif #if defined (HAVE_NCURSES_TERM_H) -#include <ncurses/term.h> +#include <ncurses/term.h> /* IWYU pragma: export */ #elif defined (HAVE_TERM_H) -#include <term.h> +#include <term.h> /* IWYU pragma: export */ #else /* On MinGW, a real termcap library is usually not present. Stub versions of the termcap functions will be built from stub-termcap.c. Readline |