Skip to content

Commit d1f90b6

Browse files
committed
[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.
1 parent 7425077 commit d1f90b6

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

clang/include/clang/Basic/Module.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ class alignas(8) Module {
159159
/// eventually be exposed, for use in "private" modules.
160160
std::string ExportAsModule;
161161

162-
/// Does this Module scope describe part of the purview of a named C++ module?
162+
/// Does this Module scope describe part of the purview of a standard named
163+
/// C++ module?
163164
bool isModulePurview() const {
164165
return Kind == ModuleInterfaceUnit || Kind == ModulePartitionInterface ||
165166
Kind == ModulePartitionImplementation ||

clang/include/clang/Serialization/ASTWriter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ class ASTWriter : public ASTDeserializationListener,
736736
bool hasChain() const { return Chain; }
737737
ASTReader *getChain() const { return Chain; }
738738

739-
bool isWritingNamedModules() const {
739+
bool isWritingStdCXXNamedModules() const {
740740
return WritingModule && WritingModule->isModulePurview();
741741
}
742742

clang/lib/Serialization/ASTWriter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4334,7 +4334,8 @@ void ASTRecordWriter::AddAttr(const Attr *A) {
43344334
// FIXME: Clang can't handle the serialization/deserialization of
43354335
// preferred_name properly now. See
43364336
// https://github.com/llvm/llvm-project/issues/56490 for example.
4337-
if (!A || (isa<PreferredNameAttr>(A) && Writer->isWritingNamedModules()))
4337+
if (!A || (isa<PreferredNameAttr>(A) &&
4338+
Writer->isWritingStdCXXNamedModules()))
43384339
return Record.push_back(0);
43394340

43404341
Record.push_back(A->getKind() + 1); // FIXME: stable encoding, target attrs

0 commit comments

Comments
 (0)