[NFC] [C++20] [Modules] Rename ASTWriter::isWritingStdCXXNamedModules

According to the discussion in
https://discourse.llvm.org/t/rfc-unifying-the-terminology-about-modules-in-clang/66054,
this patch rename ASTWriter::isWritingNamedModules to ASTWriter::isWrittingStdCXXNamedModules
to make the name more clear.
This commit is contained in:
Chuanqi Xu 2022-11-08 15:53:08 +08:00
parent 7425077e31
commit d1f90b6129
3 changed files with 5 additions and 3 deletions

View File

@ -159,7 +159,8 @@ public:
/// eventually be exposed, for use in "private" modules.
std::string ExportAsModule;
/// Does this Module scope describe part of the purview of a named C++ module?
/// Does this Module scope describe part of the purview of a standard named
/// C++ module?
bool isModulePurview() const {
return Kind == ModuleInterfaceUnit || Kind == ModulePartitionInterface ||
Kind == ModulePartitionImplementation ||

View File

@ -736,7 +736,7 @@ public:
bool hasChain() const { return Chain; }
ASTReader *getChain() const { return Chain; }
bool isWritingNamedModules() const {
bool isWritingStdCXXNamedModules() const {
return WritingModule && WritingModule->isModulePurview();
}

View File

@ -4334,7 +4334,8 @@ void ASTRecordWriter::AddAttr(const Attr *A) {
// FIXME: Clang can't handle the serialization/deserialization of
// preferred_name properly now. See
// https://github.com/llvm/llvm-project/issues/56490 for example.
if (!A || (isa<PreferredNameAttr>(A) && Writer->isWritingNamedModules()))
if (!A || (isa<PreferredNameAttr>(A) &&
Writer->isWritingStdCXXNamedModules()))
return Record.push_back(0);
Record.push_back(A->getKind() + 1); // FIXME: stable encoding, target attrs