diff options
author | Argyrios Kyrtzidis <kyrtzidis@apple.com> | 2022-06-30 14:04:14 -0700 |
---|---|---|
committer | Argyrios Kyrtzidis <kyrtzidis@apple.com> | 2022-07-01 14:22:31 -0700 |
commit | 0d3a2b4c6601d4ff341119aa537db184197d83de (patch) | |
tree | 810fde73c5f28ca301a3f3d12f4fb8e18e8da537 /llvm/tools/llvm-objdump/llvm-objdump.cpp | |
parent | bcd153485ebf07fe79e2b843ed5f1cb74997df1b (diff) | |
download | llvm-0d3a2b4c6601d4ff341119aa537db184197d83de.zip llvm-0d3a2b4c6601d4ff341119aa537db184197d83de.tar.gz llvm-0d3a2b4c6601d4ff341119aa537db184197d83de.tar.bz2 |
[Lex] Introduce `PPCallbacks::LexedFileChanged()` preprocessor callback
This is a preprocessor callback focused on the lexed file changing, without conflating effects of line number directives and other pragmas.
A client that only cares about what files the lexer processes, like dependency generation, can use this more straightforward
callback instead of `PPCallbacks::FileChanged()`. Clients that want the pragma directive effects as well can keep using `FileChanged()`.
A use case where `PPCallbacks::LexedFileChanged()` is particularly simpler to use than `FileChanged()` is in a situation
where a client wants to keep track of lexed file changes that include changes from/to the predefines buffer, where it becomes
unnecessary complicated trying to use `FileChanged()` while filtering out the pragma directives effects callbacks.
Also take the opportunity to provide information about the prior `FileID` the `Lexer` moved from, even when entering a new file.
Differential Revision: https://reviews.llvm.org/D128947
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions