@@ -130,6 +130,7 @@ class ASTReaderListener {
130
130
// /
131
131
// / \returns true to indicate the options are invalid or false otherwise.
132
132
virtual bool ReadLanguageOptions (const LangOptions &LangOpts,
133
+ StringRef ModuleFilename,
133
134
bool Complain,
134
135
bool AllowCompatibleDifferences) {
135
136
return false ;
@@ -139,7 +140,7 @@ class ASTReaderListener {
139
140
// /
140
141
// / \returns true to indicate the target options are invalid, or false
141
142
// / otherwise.
142
- virtual bool ReadTargetOptions (const TargetOptions &TargetOpts, bool Complain,
143
+ virtual bool ReadTargetOptions (const TargetOptions &TargetOpts, StringRef ModuleFilename, bool Complain,
143
144
bool AllowCompatibleDifferences) {
144
145
return false ;
145
146
}
@@ -150,6 +151,7 @@ class ASTReaderListener {
150
151
// / otherwise.
151
152
virtual bool
152
153
ReadDiagnosticOptions (IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts,
154
+ StringRef ModuleFilename,
153
155
bool Complain) {
154
156
return false ;
155
157
}
@@ -172,6 +174,7 @@ class ASTReaderListener {
172
174
// / \returns true to indicate the header search options are invalid, or false
173
175
// / otherwise.
174
176
virtual bool ReadHeaderSearchOptions (const HeaderSearchOptions &HSOpts,
177
+ StringRef ModuleFilename,
175
178
StringRef SpecificModuleCachePath,
176
179
bool Complain) {
177
180
return false ;
@@ -200,6 +203,7 @@ class ASTReaderListener {
200
203
// / \returns true to indicate the preprocessor options are invalid, or false
201
204
// / otherwise.
202
205
virtual bool ReadPreprocessorOptions (const PreprocessorOptions &PPOpts,
206
+ StringRef ModuleFilename,
203
207
bool ReadMacros, bool Complain,
204
208
std::string &SuggestedPredefines) {
205
209
return false ;
@@ -262,19 +266,22 @@ class ChainedASTReaderListener : public ASTReaderListener {
262
266
bool ReadFullVersionInformation (StringRef FullVersion) override ;
263
267
void ReadModuleName (StringRef ModuleName) override ;
264
268
void ReadModuleMapFile (StringRef ModuleMapPath) override ;
265
- bool ReadLanguageOptions (const LangOptions &LangOpts, bool Complain,
269
+ bool ReadLanguageOptions (const LangOptions &LangOpts, StringRef ModuleFilename, bool Complain,
266
270
bool AllowCompatibleDifferences) override ;
267
- bool ReadTargetOptions (const TargetOptions &TargetOpts, bool Complain,
271
+ bool ReadTargetOptions (const TargetOptions &TargetOpts, StringRef ModuleFilename, bool Complain,
268
272
bool AllowCompatibleDifferences) override ;
269
273
bool ReadDiagnosticOptions (IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts,
274
+ StringRef ModuleFilename,
270
275
bool Complain) override ;
271
276
bool ReadFileSystemOptions (const FileSystemOptions &FSOpts,
272
277
bool Complain) override ;
273
278
274
279
bool ReadHeaderSearchOptions (const HeaderSearchOptions &HSOpts,
280
+ StringRef ModuleFilename,
275
281
StringRef SpecificModuleCachePath,
276
282
bool Complain) override ;
277
283
bool ReadPreprocessorOptions (const PreprocessorOptions &PPOpts,
284
+ StringRef ModuleFilename,
278
285
bool ReadMacros, bool Complain,
279
286
std::string &SuggestedPredefines) override ;
280
287
@@ -299,16 +306,19 @@ class PCHValidator : public ASTReaderListener {
299
306
PCHValidator (Preprocessor &PP, ASTReader &Reader)
300
307
: PP(PP), Reader(Reader) {}
301
308
302
- bool ReadLanguageOptions (const LangOptions &LangOpts, bool Complain,
309
+ bool ReadLanguageOptions (const LangOptions &LangOpts, StringRef ModuleFilename, bool Complain,
303
310
bool AllowCompatibleDifferences) override ;
304
- bool ReadTargetOptions (const TargetOptions &TargetOpts, bool Complain,
311
+ bool ReadTargetOptions (const TargetOptions &TargetOpts, StringRef ModuleFilename, bool Complain,
305
312
bool AllowCompatibleDifferences) override ;
306
313
bool ReadDiagnosticOptions (IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts,
314
+ StringRef ModuleFilename,
307
315
bool Complain) override ;
308
316
bool ReadPreprocessorOptions (const PreprocessorOptions &PPOpts,
317
+ StringRef ModuleFilename,
309
318
bool ReadMacros, bool Complain,
310
319
std::string &SuggestedPredefines) override ;
311
320
bool ReadHeaderSearchOptions (const HeaderSearchOptions &HSOpts,
321
+ StringRef ModuleFilename,
312
322
StringRef SpecificModuleCachePath,
313
323
bool Complain) override ;
314
324
void ReadCounter (const serialization::ModuleFile &M, unsigned Value) override ;
@@ -325,6 +335,7 @@ class SimpleASTReaderListener : public ASTReaderListener {
325
335
SimpleASTReaderListener (Preprocessor &PP) : PP(PP) {}
326
336
327
337
bool ReadPreprocessorOptions (const PreprocessorOptions &PPOpts,
338
+ StringRef ModuleFilename,
328
339
bool ReadMacros, bool Complain,
329
340
std::string &SuggestedPredefines) override ;
330
341
};
@@ -1367,7 +1378,7 @@ class ASTReader
1367
1378
const ModuleFile *ImportedBy,
1368
1379
unsigned ClientLoadCapabilities);
1369
1380
static ASTReadResult ReadOptionsBlock (
1370
- llvm::BitstreamCursor &Stream, unsigned ClientLoadCapabilities,
1381
+ llvm::BitstreamCursor &Stream, StringRef Filename, unsigned ClientLoadCapabilities,
1371
1382
bool AllowCompatibleConfigurationMismatch, ASTReaderListener &Listener,
1372
1383
std::string &SuggestedPredefines);
1373
1384
@@ -1380,6 +1391,7 @@ class ASTReader
1380
1391
1381
1392
static ASTReadResult
1382
1393
readUnhashedControlBlockImpl (ModuleFile *F, llvm::StringRef StreamData,
1394
+ StringRef Filename,
1383
1395
unsigned ClientLoadCapabilities,
1384
1396
bool AllowCompatibleConfigurationMismatch,
1385
1397
ASTReaderListener *Listener,
@@ -1396,21 +1408,21 @@ class ASTReader
1396
1408
unsigned ClientLoadCapabilities);
1397
1409
llvm::Error ReadSubmoduleBlock (ModuleFile &F,
1398
1410
unsigned ClientLoadCapabilities);
1399
- static bool ParseLanguageOptions (const RecordData &Record, bool Complain,
1411
+ static bool ParseLanguageOptions (const RecordData &Record, StringRef ModuleFilename, bool Complain,
1400
1412
ASTReaderListener &Listener,
1401
1413
bool AllowCompatibleDifferences);
1402
- static bool ParseTargetOptions (const RecordData &Record, bool Complain,
1414
+ static bool ParseTargetOptions (const RecordData &Record, StringRef ModuleFilename, bool Complain,
1403
1415
ASTReaderListener &Listener,
1404
1416
bool AllowCompatibleDifferences);
1405
- static bool ParseDiagnosticOptions (const RecordData &Record, bool Complain,
1417
+ static bool ParseDiagnosticOptions (const RecordData &Record, StringRef ModuleFilename, bool Complain,
1406
1418
ASTReaderListener &Listener);
1407
1419
static bool ParseFileSystemOptions (const RecordData &Record, bool Complain,
1408
1420
ASTReaderListener &Listener);
1409
- static bool ParseHeaderSearchOptions (const RecordData &Record, bool Complain,
1421
+ static bool ParseHeaderSearchOptions (const RecordData &Record, StringRef ModuleFilename, bool Complain,
1410
1422
ASTReaderListener &Listener);
1411
1423
static bool ParseHeaderSearchPaths (const RecordData &Record, bool Complain,
1412
1424
ASTReaderListener &Listener);
1413
- static bool ParsePreprocessorOptions (const RecordData &Record, bool Complain,
1425
+ static bool ParsePreprocessorOptions (const RecordData &Record, StringRef ModuleFilename, bool Complain,
1414
1426
ASTReaderListener &Listener,
1415
1427
std::string &SuggestedPredefines);
1416
1428
0 commit comments