llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) <details> <summary>Changes</summary> Instead of doing the casting around `Block::data()` ourselves. --- Full diff: https://github.com/llvm/llvm-project/pull/178630.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/EvalEmitter.cpp (+2-2) ``````````diff diff --git a/clang/lib/AST/ByteCode/EvalEmitter.cpp b/clang/lib/AST/ByteCode/EvalEmitter.cpp index cf3cc1b17133c..7d44c32d73555 100644 --- a/clang/lib/AST/ByteCode/EvalEmitter.cpp +++ b/clang/lib/AST/ByteCode/EvalEmitter.cpp @@ -293,7 +293,7 @@ bool EvalEmitter::emitGetLocal(uint32_t I, SourceInfo Info) { if (!CheckLocalLoad(S, OpPC, B)) return false; - S.Stk.push<T>(*reinterpret_cast<T *>(B->data())); + S.Stk.push<T>(B->deref<T>()); return true; } @@ -305,7 +305,7 @@ bool EvalEmitter::emitSetLocal(uint32_t I, SourceInfo Info) { using T = typename PrimConv<OpType>::T; Block *B = getLocal(I); - *reinterpret_cast<T *>(B->data()) = S.Stk.pop<T>(); + B->deref<T>() = S.Stk.pop<T>(); auto &Desc = B->getBlockDesc<InlineDescriptor>(); Desc.IsInitialized = true; `````````` </details> https://github.com/llvm/llvm-project/pull/178630 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
