Skip to content

Commit d49490d

Browse files
committed
Revert "[ClangImporter] Align callback with Clang change (#71475)"
This reverts commit 757c50c.
1 parent 757c50c commit d49490d

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,9 @@ namespace {
117117
clang::SourceLocation HashLoc, const clang::Token &IncludeTok,
118118
StringRef FileName, bool IsAngled, clang::CharSourceRange FilenameRange,
119119
clang::OptionalFileEntryRef File, StringRef SearchPath,
120-
StringRef RelativePath, const clang::Module *SuggestedModule,
121-
bool ModuleImported,
120+
StringRef RelativePath, const clang::Module *Imported,
122121
clang::SrcMgr::CharacteristicKind FileType) override {
123-
handleImport(ModuleImported ? SuggestedModule : nullptr);
122+
handleImport(Imported);
124123
}
125124

126125
void moduleImport(clang::SourceLocation ImportLoc,
@@ -294,19 +293,18 @@ class BridgingPPTracker : public clang::PPCallbacks {
294293
bool IsAngled, clang::CharSourceRange FilenameRange,
295294
clang::OptionalFileEntryRef File,
296295
StringRef SearchPath, StringRef RelativePath,
297-
const clang::Module *SuggestedModule,
298-
bool ModuleImported,
296+
const clang::Module *Imported,
299297
clang::SrcMgr::CharacteristicKind FileType) override {
300-
if (!ModuleImported) {
298+
if (!Imported) {
301299
if (File)
302300
Impl.BridgeHeaderFiles.insert(*File);
303301
return;
304302
}
305303
// Synthesize identifier locations.
306304
SmallVector<clang::SourceLocation, 4> IdLocs;
307-
for (unsigned I = 0, E = getNumModuleIdentifiers(SuggestedModule); I != E; ++I)
305+
for (unsigned I = 0, E = getNumModuleIdentifiers(Imported); I != E; ++I)
308306
IdLocs.push_back(HashLoc);
309-
handleImport(HashLoc, IdLocs, SuggestedModule);
307+
handleImport(HashLoc, IdLocs, Imported);
310308
}
311309

312310
void moduleImport(clang::SourceLocation ImportLoc,

0 commit comments

Comments
 (0)