From: Timm Bäder Date: Thu, 4 May 2023 10:57:37 +0000 (+0200) Subject: [clang][Interp][NFC] Fix allocateLocalPrimitive parameter name X-Git-Tag: upstream/17.0.6~9531 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c3f1faf96f18ca2162aff96b0adaf4cd22689ad4;p=platform%2Fupstream%2Fllvm.git [clang][Interp][NFC] Fix allocateLocalPrimitive parameter name This is passed on to Program::createDescriptor, where it is used as a value for IsConst. --- diff --git a/clang/lib/AST/Interp/ByteCodeExprGen.cpp b/clang/lib/AST/Interp/ByteCodeExprGen.cpp index ca9d345..df7c4a7 100644 --- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp +++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp @@ -831,7 +831,7 @@ bool ByteCodeExprGen::VisitMaterializeTemporaryExpr( // For everyhing else, use local variables. if (SubExprT) { if (std::optional LocalIndex = allocateLocalPrimitive( - SubExpr, *SubExprT, /*IsMutable=*/true, /*IsExtended=*/true)) { + SubExpr, *SubExprT, /*IsConst=*/true, /*IsExtended=*/true)) { if (!this->visitInitializer(SubExpr)) return false; this->emitSetLocal(*SubExprT, *LocalIndex, E); diff --git a/clang/lib/AST/Interp/ByteCodeExprGen.h b/clang/lib/AST/Interp/ByteCodeExprGen.h index a3aab16..52a8eca 100644 --- a/clang/lib/AST/Interp/ByteCodeExprGen.h +++ b/clang/lib/AST/Interp/ByteCodeExprGen.h @@ -185,7 +185,7 @@ protected: llvm::function_ref V); /// Creates a local primitive value. - unsigned allocateLocalPrimitive(DeclTy &&Decl, PrimType Ty, bool IsMutable, + unsigned allocateLocalPrimitive(DeclTy &&Decl, PrimType Ty, bool IsConst, bool IsExtended = false); /// Allocates a space storing a local given its type.