Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions clang/include/clang/Serialization/ASTReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,15 +246,16 @@ class ASTReaderListener {
return true;
}

/// Overloaded member function of \c visitInputFile that should
/// be defined when there is a distinction between
/// the file name and name-as-requested. For example, when deserializing input
/// Similiar to member function of \c visitInputFile but should
/// be defined when there is a distinction between the file name
/// and the name-as-requested. For example, when deserializing input
/// files from precompiled AST files.
///
/// \returns true to continue receiving the next input file, false to stop.
virtual bool visitInputFile(StringRef FilenameAsRequested, StringRef Filename,
bool isSystem, bool isOverridden,
bool isExplicitModule) {
virtual bool visitInputFileAsRequested(StringRef FilenameAsRequested,
StringRef Filename, bool isSystem,
bool isOverridden,
bool isExplicitModule) {
return true;
}

Expand Down
7 changes: 4 additions & 3 deletions clang/lib/Frontend/FrontendActions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -796,9 +796,10 @@ namespace {
/// Indicates that the AST file contains particular input file.
///
/// \returns true to continue receiving the next input file, false to stop.
bool visitInputFile(StringRef FilenameAsRequested, StringRef Filename,
bool isSystem, bool isOverridden,
bool isExplicitModule) override {
bool visitInputFileAsRequested(StringRef FilenameAsRequested,
StringRef Filename, bool isSystem,
bool isOverridden,
bool isExplicitModule) override {

Out.indent(2) << "Input file: " << FilenameAsRequested;

Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Serialization/ASTReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5987,7 +5987,7 @@ bool ASTReader::readASTFileControlBlock(
AdditionalPathBuf, UnresolvedFilename, ModuleDir);
Filename = *FilenameBuf;
}
shouldContinue = Listener.visitInputFile(
shouldContinue = Listener.visitInputFileAsRequested(
*FilenameAsRequestedBuf, Filename, isSystemFile, Overridden,
/*IsExplicitModule=*/false);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,10 @@ class PrebuiltModuleListener : public ASTReaderListener {
/// For each input file discovered, check whether it's external path is in a
/// stable directory. Traversal is stopped if the current module is not
/// considered stable.
bool visitInputFile(StringRef FilenameAsRequested, StringRef Filename,
bool isSystem, bool isOverridden,
bool isExplicitModule) override {
bool visitInputFileAsRequested(StringRef FilenameAsRequested,
StringRef Filename, bool isSystem,
bool isOverridden,
bool isExplicitModule) override {
if (StableDirs.empty())
return false;
auto PrebuiltEntryIt = PrebuiltModulesASTMap.find(CurrentFile);
Expand Down