File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -2796,6 +2796,17 @@ void Preprocessor::setOnWillIncludeHeader(
27962796
27972797void Preprocessor::squeeze () { d->pool_ .reset (); }
27982798
2799+ auto Preprocessor::sourceFileName (uint32_t sourceFileId) const
2800+ -> const std::string & {
2801+ assert (sourceFileId > 0 );
2802+ return d->sourceFiles_ [sourceFileId - 1 ]->fileName ;
2803+ }
2804+
2805+ auto Preprocessor::source (uint32_t sourceFileId) const -> const std::string & {
2806+ assert (sourceFileId > 0 );
2807+ return d->sourceFiles_ [sourceFileId - 1 ]->source ;
2808+ }
2809+
27992810void Preprocessor::preprocess (std::string source, std::string fileName,
28002811 std::vector<Token> &tokens) {
28012812 struct {
Original file line number Diff line number Diff line change @@ -119,6 +119,11 @@ class Preprocessor {
119119 [[nodiscard]] auto continuePreprocessing (std::vector<Token> &outputTokens)
120120 -> Status;
121121
122+ [[nodiscard]] auto sourceFileName (uint32_t sourceFileId) const
123+ -> const std::string &;
124+
125+ [[nodiscard]] auto source (uint32_t sourceFileId) const -> const std::string &;
126+
122127 void preprocess (std::string source, std::string fileName,
123128 std::vector<Token> &tokens);
124129
You can’t perform that action at this time.
0 commit comments