clang-tools 20.0.0git
|
Store all the needed module files information to parse a single source file. More...
#include <ModulesBuilder.h>
Public Member Functions | |
virtual void | adjustHeaderSearchOptions (HeaderSearchOptions &Options) const =0 |
Change commands to load the module files recorded in this PrerequisiteModules first. | |
virtual bool | canReuse (const CompilerInvocation &CI, llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem >) const =0 |
Whether or not the built module files are up to date. | |
virtual | ~PrerequisiteModules ()=default |
Store all the needed module files information to parse a single source file.
e.g.,
For the source file c.cppm
, an instance of the class will store the module files for a.cppm
and b.cppm
. But the module file for c.cppm
won't be stored. Since it is not needed to parse c.cppm
.
Users should only get PrerequisiteModules from ModulesBuilder::buildPrerequisiteModulesFor(...)
.
Users can detect whether the PrerequisiteModules is still up to date by calling the canReuse()
member function.
The users should call adjustHeaderSearchOptions(...)
to update the compilation commands to select the built module files first. Before calling adjustHeaderSearchOptions()
, users should call canReuse()
first to check if all the stored module files are valid. In case they are not valid, users should call ModulesBuilder::buildPrerequisiteModulesFor(...)
again to get the new PrerequisiteModules.
Definition at line 66 of file ModulesBuilder.h.
|
virtualdefault |
|
pure virtual |
Change commands to load the module files recorded in this PrerequisiteModules first.
|
pure virtual |
Whether or not the built module files are up to date.
Note that this can only be used after building the module files.