aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Serialization/ASTWriter.cpp
diff options
context:
space:
mode:
authorDavid Stone <davidfromonline@gmail.com>2024-05-05 01:45:04 -0600
committerGitHub <noreply@github.com>2024-05-05 09:45:04 +0200
commit7d913c5ea9fd0dd455fe60364a8075aa0924d6b7 (patch)
tree1ecc5b825a79cb837994f30135c2ca27c3968776 /clang/lib/Serialization/ASTWriter.cpp
parent9154a324bfce5dee27cb04708bd250b030d6cdd2 (diff)
downloadllvm-7d913c5ea9fd0dd455fe60364a8075aa0924d6b7.zip
llvm-7d913c5ea9fd0dd455fe60364a8075aa0924d6b7.tar.gz
llvm-7d913c5ea9fd0dd455fe60364a8075aa0924d6b7.tar.bz2
[clang][Modules] Make `Module::Requirement` a struct (NFC) (#67900)
`Module::Requirement` was defined as a `std::pair<std::string, bool>`. This required a comment to explain what the data members mean and makes the usage harder to understand. Replace this with a struct with two members, `FeatureName` and `RequiredState`. --------- Co-authored-by: cor3ntin <corentinjabot@gmail.com>
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 9712ed6..afe98e8 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -2988,8 +2988,8 @@ void ASTWriter::WriteSubmodules(Module *WritingModule) {
// Emit the requirements.
for (const auto &R : Mod->Requirements) {
- RecordData::value_type Record[] = {SUBMODULE_REQUIRES, R.second};
- Stream.EmitRecordWithBlob(RequiresAbbrev, Record, R.first);
+ RecordData::value_type Record[] = {SUBMODULE_REQUIRES, R.RequiredState};
+ Stream.EmitRecordWithBlob(RequiresAbbrev, Record, R.FeatureName);
}
// Emit the umbrella header, if there is one.