diff --git a/clang/include/clang/Lex/Preprocessor.h b/clang/include/clang/Lex/Preprocessor.h --- a/clang/include/clang/Lex/Preprocessor.h +++ b/clang/include/clang/Lex/Preprocessor.h @@ -1375,6 +1375,11 @@ StringRef getLastMacroWithSpelling(SourceLocation Loc, ArrayRef Tokens) const; + /// Get the predefines for this processor. + /// Used by some third-party tools to inspect and add predefines (see + /// https://github.com/llvm/llvm-project/issues/57483). + const std::string &getPredefines() const { return Predefines; } + /// Set the predefines for this Preprocessor. /// /// These predefines are automatically injected when parsing the main file.