Skip to content

Commit 737d2ac

Browse files
committed
[clang][Interp][NFC] Make Block::Desc const
1 parent f8b7506 commit 737d2ac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clang/lib/AST/Interp/InterpBlock.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Block final {
5353
bool IsStatic = false, bool IsExtern = false)
5454
: DeclID(DeclID), IsStatic(IsStatic), IsExtern(IsExtern), Desc(Desc) {}
5555

56-
Block(Descriptor *Desc, bool IsStatic = false, bool IsExtern = false)
56+
Block(const Descriptor *Desc, bool IsStatic = false, bool IsExtern = false)
5757
: DeclID((unsigned)-1), IsStatic(IsStatic), IsExtern(IsExtern),
5858
Desc(Desc) {}
5959

@@ -120,8 +120,8 @@ class Block final {
120120
friend class DeadBlock;
121121
friend class InterpState;
122122

123-
Block(Descriptor *Desc, bool IsExtern, bool IsStatic, bool IsDead)
124-
: IsStatic(IsStatic), IsExtern(IsExtern), IsDead(true), Desc(Desc) {}
123+
Block(const Descriptor *Desc, bool IsExtern, bool IsStatic, bool IsDead)
124+
: IsStatic(IsStatic), IsExtern(IsExtern), IsDead(true), Desc(Desc) {}
125125

126126
/// Deletes a dead block at the end of its lifetime.
127127
void cleanup();
@@ -149,7 +149,7 @@ class Block final {
149149
/// via invokeCtor.
150150
bool IsInitialized = false;
151151
/// Pointer to the stack slot descriptor.
152-
Descriptor *Desc;
152+
const Descriptor *Desc;
153153
};
154154

155155
/// Descriptor for a dead block.

0 commit comments

Comments
 (0)