mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Clang tool: Enable incremental pre-processing
This avoids doing extra work when processing multiple input files. PiperOrigin-RevId: 539884025 Change-Id: I8e48495f33c09bc53e70f4d5c1d730fe7c1202b2
This commit is contained in:
parent
f2048d028f
commit
04cb14791e
|
@ -26,6 +26,7 @@
|
|||
#include "clang/Frontend/CompilerInstance.h"
|
||||
#include "clang/Frontend/CompilerInvocation.h"
|
||||
#include "clang/Frontend/FrontendAction.h"
|
||||
#include "clang/Lex/Preprocessor.h"
|
||||
#include "clang/Tooling/Tooling.h"
|
||||
#include "sandboxed_api/tools/clang_generator/emitter.h"
|
||||
#include "sandboxed_api/tools/clang_generator/types.h"
|
||||
|
@ -116,6 +117,11 @@ class GeneratorAction : public clang::ASTFrontendAction {
|
|||
emitter_, options_);
|
||||
}
|
||||
|
||||
bool BeginSourceFileAction(clang::CompilerInstance& ci) override {
|
||||
ci.getPreprocessor().enableIncrementalProcessing();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool hasCodeCompletionSupport() const override { return false; }
|
||||
|
||||
Emitter& emitter_;
|
||||
|
|
Loading…
Reference in New Issue
Block a user