Vuo 2.4.4
Loading...
Searching...
No Matches
VuoPreprocessAction.cc
Go to the documentation of this file.
1
12
13using namespace clang;
14
21VuoPreprocessAction::VuoPreprocessAction(raw_ostream &output, unique_ptr<VuoPreprocessorCallbacks> preprocessorCallbacks) :
22 PrintPreprocessedAction(),
23 output(output),
24 preprocessorCallbacks(std::move(preprocessorCallbacks))
25{
26}
27
32{
33 CI.getPreprocessor().addPPCallbacks(std::move(preprocessorCallbacks));
34 return true;
35}
36
41{
42 CompilerInstance &compilerInstance = getCompilerInstance();
43 compilerInstance.getPreprocessorOutputOpts().ShowCPP = 1;
44 compilerInstance.getPreprocessorOutputOpts().ShowComments = 1;
45 compilerInstance.getPreprocessorOutputOpts().ShowIncludeDirectives = 1;
46 compilerInstance.getPreprocessorOutputOpts().ShowMacros = 1;
47 compilerInstance.getPreprocessorOutputOpts().UseLineDirectives = 1;
48 DoPrintPreprocessedInput(compilerInstance.getPreprocessor(), &output, compilerInstance.getPreprocessorOutputOpts());
49}