[clang] [clang][Interp] Integral pointers (PR #84159)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 7 09:46:29 PST 2024


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>


================
@@ -28,11 +28,26 @@ class Block;
 class DeadBlock;
 class Pointer;
 class Context;
+template <unsigned A, bool B> class Integral;
 enum PrimType : unsigned;
 
 class Pointer;
 inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const Pointer &P);
 
+struct BlockPointer {
+  /// The block the pointer is pointing to.
+  Block *Pointee;
+  /// Start of the current subfield.
+  unsigned Base;
+};
+
+struct IntPointer {
+  const Descriptor *Desc;
+  int Value;
----------------
tbaederr wrote:

I was wondering about that... shouldn't it be a `uint64_t`? For the case where we're on a 32 bit host and compile for a 64 bit target?

https://github.com/llvm/llvm-project/pull/84159


More information about the cfe-commits mailing list