@@ -2379,7 +2379,6 @@ resolveFileIDConflicts(const ModuleDecl *module, StringRef fileString,
2379
2379
const llvm::StringMap<SourceFilePathInfo> &paths,
2380
2380
bool shouldDiagnose) {
2381
2381
assert (paths.size () > 1 );
2382
- assert (module ->getASTContext ().LangOpts .EnableConcisePoundFile );
2383
2382
2384
2383
// / The path we consider to be "correct"; we will emit fix-its changing the
2385
2384
// / other paths to match this one.
@@ -2429,7 +2428,7 @@ resolveFileIDConflicts(const ModuleDecl *module, StringRef fileString,
2429
2428
2430
2429
for (auto loc : pathPair.second .virtualFileLocs ) {
2431
2430
diags.diagnose (loc,
2432
- diag::pound_source_location_creates_pound_file_conflicts ,
2431
+ diag::source_location_creates_file_id_conflicts ,
2433
2432
fileString);
2434
2433
2435
2434
// Offer a fix-it unless it would be tautological.
@@ -2447,18 +2446,15 @@ ModuleDecl::computeFileIDMap(bool shouldDiagnose) const {
2447
2446
llvm::StringMap<std::pair<std::string, bool >> result;
2448
2447
SmallString<64 > scratch;
2449
2448
2450
- if (!getASTContext ().LangOpts .EnableConcisePoundFile )
2451
- return result;
2452
-
2453
2449
for (auto &namePair : getInfoForUsedFileNames (this )) {
2454
2450
computeFileID (this , namePair.first (), scratch);
2455
2451
auto &infoForPaths = namePair.second ;
2456
2452
2457
2453
assert (!infoForPaths.empty ());
2458
2454
2459
2455
// TODO: In the future, we'd like to handle these conflicts gracefully by
2460
- // generating a unique `#file ` string for each conflicting name. For now, we
2461
- // will simply warn about conflicts.
2456
+ // generating a unique `#fileID ` string for each conflicting name. For now,
2457
+ // we will simply warn about conflicts.
2462
2458
StringRef winner = infoForPaths.begin ()->first ();
2463
2459
if (infoForPaths.size () > 1 )
2464
2460
winner = resolveFileIDConflicts (this , scratch, infoForPaths,
0 commit comments