[clang] [clang][Interp] Integral pointers (PR #84159)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 25 06:20:44 PDT 2024
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/84159 at github.com>
================
@@ -2218,6 +2238,14 @@ inline bool GetFnPtr(InterpState &S, CodePtr OpPC, const Function *Func) {
return true;
}
+template <PrimType Name, class T = typename PrimConv<Name>::T>
+inline bool GetIntPtr(InterpState &S, CodePtr OpPC, const Descriptor *Desc) {
+ const T &IntVal = S.Stk.pop<T>();
+
+ S.Stk.push<Pointer>(static_cast<int64_t>(IntVal), Desc);
----------------
AaronBallman wrote:
`uint64_t`?
https://github.com/llvm/llvm-project/pull/84159
More information about the cfe-commits
mailing list