preprocessor: Add support for header unit translation

libcpp/
	* files.c (struct _cpp_file): Add header_unit field.
	(_cpp_stack_file): Add header unit support.
	(cpp_find_header_unit): New.
	* include/cpplib.h (cpp_find_header_unit): Declare.
This commit is contained in:
Nathan Sidwell 2020-11-18 08:27:16 -08:00
parent db87f19ae3
commit 7ceb899e93
2 changed files with 115 additions and 37 deletions

View file

@ -983,6 +983,9 @@ extern cpp_callbacks *cpp_get_callbacks (cpp_reader *) ATTRIBUTE_PURE;
extern void cpp_set_callbacks (cpp_reader *, cpp_callbacks *);
extern class mkdeps *cpp_get_deps (cpp_reader *) ATTRIBUTE_PURE;
extern const char *cpp_find_header_unit (cpp_reader *, const char *file,
bool angle_p, location_t);
/* This function reads the file, but does not start preprocessing. It
returns the name of the original file; this is the same as the
input file, except for preprocessed input. This will generate at