diff --git a/clang/lib/AST/Interp/InterpBlock.h b/clang/lib/AST/Interp/InterpBlock.h index 89f937b588fb6..4ab67ebb9eaaf 100644 --- a/clang/lib/AST/Interp/InterpBlock.h +++ b/clang/lib/AST/Interp/InterpBlock.h @@ -53,7 +53,7 @@ class Block final { bool IsStatic = false, bool IsExtern = false) : DeclID(DeclID), IsStatic(IsStatic), IsExtern(IsExtern), Desc(Desc) {} - Block(Descriptor *Desc, bool IsStatic = false, bool IsExtern = false) + Block(const Descriptor *Desc, bool IsStatic = false, bool IsExtern = false) : DeclID((unsigned)-1), IsStatic(IsStatic), IsExtern(IsExtern), Desc(Desc) {} @@ -120,8 +120,8 @@ class Block final { friend class DeadBlock; friend class InterpState; - Block(Descriptor *Desc, bool IsExtern, bool IsStatic, bool IsDead) - : IsStatic(IsStatic), IsExtern(IsExtern), IsDead(true), Desc(Desc) {} + Block(const Descriptor *Desc, bool IsExtern, bool IsStatic, bool IsDead) + : IsStatic(IsStatic), IsExtern(IsExtern), IsDead(true), Desc(Desc) {} /// Deletes a dead block at the end of its lifetime. void cleanup(); @@ -149,7 +149,7 @@ class Block final { /// via invokeCtor. bool IsInitialized = false; /// Pointer to the stack slot descriptor. - Descriptor *Desc; + const Descriptor *Desc; }; /// Descriptor for a dead block.