[PATCH] D67127: [clang-scan-deps] add skip excluded conditional preprocessor block preprocessing optimization
Alex Lorenz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 4 13:12:00 PDT 2019
arphaman added inline comments.
================
Comment at: clang/include/clang/Frontend/CompilerInstance.h:256
+ /// preprocessor.
+ void setAdditionalPPCallbacks(std::unique_ptr<PPCallbacks> PPC);
+
----------------
Bigcheese wrote:
> This kinda sounds like it can be called multiple times. Is there any way you can use chained pp callbacks?
Good idea, I implemented support for adding multiple ones with chained callbacks.
================
Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:171-177
+llvm::cl::opt<bool> SkipExcludedPPRanges(
+ "skip-excluded-pp-ranges",
+ llvm::cl::desc(
+ "Use the preprocessor optimization that skips excluded conditionals by "
+ "bumping the buffer pointer in the lexer instead of lexing the tokens "
+ "until reaching the end directive."),
+ llvm::cl::init(true), llvm::cl::cat(DependencyScannerCategory));
----------------
Bigcheese wrote:
> Is there any reason for this to be configurable other than for perf testing?
It's just for perf-testing / verification. No other reason.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67127/new/
https://reviews.llvm.org/D67127
More information about the cfe-commits
mailing list