Skip to content

Commit

Permalink
Add comments on the constants for BlockValueStore
Browse files Browse the repository at this point in the history
This allows the reader to understand their purpose without having to
find and understand BlockValueStore beforehand.
  • Loading branch information
danakj committed Nov 29, 2024
1 parent 831dd2c commit 31a6764
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions toolchain/sem_ir/ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,7 @@ constexpr NameScopeId NameScopeId::Package = NameScopeId(0);

// The ID of an instruction block.
struct InstBlockId : public IdBase, public Printable<InstBlockId> {
// Constants for BlockValueStore<InstBlockId>.
using ElementType = InstId;
using ValueType = llvm::MutableArrayRef<ElementType>;

Expand Down Expand Up @@ -704,6 +705,7 @@ constexpr InstBlockId InstBlockId::Unreachable = InstBlockId(InvalidIndex - 1);
// The ID of a type block.
struct StructTypeFieldsId : public IdBase,
public Printable<StructTypeFieldsId> {
// Constants for BlockValueStore<StructTypeFieldsId>.
using ElementType = StructTypeField;
using ValueType = llvm::MutableArrayRef<StructTypeField>;

Expand Down Expand Up @@ -781,6 +783,7 @@ constexpr TypeId TypeId::Invalid = TypeId(InvalidIndex);

// The ID of a type block.
struct TypeBlockId : public IdBase, public Printable<TypeBlockId> {
// Constants for BlockValueStore<TypeBlockId>.
using ElementType = TypeId;
using ValueType = llvm::MutableArrayRef<ElementType>;

Expand Down

0 comments on commit 31a6764

Please sign in to comment.