[clang] 1d1fe29 - [clang][bytecode][NFC] assert(Func) in InterpFrame ctor (#220284)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 2 00:02:46 PDT 2026
Author: Timm Baeder
Date: 2026-09-02T09:02:41+02:00
New Revision: 1d1fe29db747cb51fe74fd034c2786a5c6b05342
URL: https://github.com/llvm/llvm-project/commit/1d1fe29db747cb51fe74fd034c2786a5c6b05342
DIFF: https://github.com/llvm/llvm-project/commit/1d1fe29db747cb51fe74fd034c2786a5c6b05342.diff
LOG: [clang][bytecode][NFC] assert(Func) in InterpFrame ctor (#220284)
`Func` is only null for the bottom frame, which we create using another
constructor.
Added:
Modified:
clang/lib/AST/ByteCode/InterpFrame.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/ByteCode/InterpFrame.cpp b/clang/lib/AST/ByteCode/InterpFrame.cpp
index 033e35eee42ad..b895dee3ae1ec 100644
--- a/clang/lib/AST/ByteCode/InterpFrame.cpp
+++ b/clang/lib/AST/ByteCode/InterpFrame.cpp
@@ -32,13 +32,11 @@ InterpFrame::InterpFrame(InterpState &S, const Function *Func,
: Caller(Caller), S(S), Func(Func), RetPC(RetPC),
Args(static_cast<char *>(S.Stk.top())), ArgSize(ArgSize),
Depth(Caller ? Caller->Depth + 1 : 0) {
+ assert(Func);
#ifndef NDEBUG
FrameOffset = S.Stk.size();
#endif
- if (!Func)
- return;
-
FuncFlags |= Func->hasRVO() * HasRVOFlag;
FuncFlags |= Func->hasThisPointer() * HasThisFlag;
More information about the cfe-commits
mailing list