[PATCH] D141472: [clang][Interp] Add function pointers
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 11 02:14:15 PST 2023
tbaeder created this revision.
tbaeder added reviewers: aaron.ballman, tahonermann, erichkeane, shafik.
Herald added a project: All.
tbaeder requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This adds a `FunctionPointer` class as well as a new `FnPtr` primtype.
It also adds a `CallPtr` opcode that pops a `FunctionPointer` from the stack and calls its function.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D141472
Files:
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/lib/AST/Interp/Context.cpp
clang/lib/AST/Interp/Descriptor.cpp
clang/lib/AST/Interp/FunctionPointer.h
clang/lib/AST/Interp/Interp.h
clang/lib/AST/Interp/InterpStack.h
clang/lib/AST/Interp/Opcodes.td
clang/lib/AST/Interp/PrimType.cpp
clang/lib/AST/Interp/PrimType.h
clang/test/AST/Interp/functions.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141472.488119.patch
Type: text/x-patch
Size: 13920 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230111/37a4d18f/attachment.bin>
More information about the cfe-commits
mailing list