[llvm] [ORC] Add Value support for capturing runtime JITed code results in clang-repl. (PR #145263)
Vassil Vassilev via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 21 23:54:04 PDT 2025
================
@@ -0,0 +1,219 @@
+//===------------------------- Value.h --------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Value class for capturing raw runtime values along with their type
+// information.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_EXECUTIONENGINE_ORC_SHARED_VALUE_H
+#define LLVM_EXECUTIONENGINE_ORC_SHARED_VALUE_H
+
+#include "llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h"
+
+namespace llvm {
+namespace orc {
+
+#define BUILTIN_TYPES \
+ X(bool, Bool) \
+ X(char, Char_S) \
+ X(int8_t, SChar) \
+ X(uint8_t, Char_U) \
+ X(uint8_t, UChar) \
+ X(int16_t, Short) \
+ X(uint16_t, UShort) \
+ X(int32_t, Int) \
+ X(uint32_t, UInt) \
+ X(int64_t, LongLong) \
+ X(uint64_t, ULongLong) \
+ // X(long, Long) \
+ // X(unsigned long, ULong) \
+ // X(float, Float) \
+ // X(double, Double) \
+ // X(long double, LongDouble)
+
+class Value {
----------------
vgvassilev wrote:
Ideally, we should merge it with https://github.com/llvm/llvm-project/blob/1def4572286b2df78828642dd0932fc356cd6200/clang/include/clang/Interpreter/Value.h#L95 and have a single implementation.
https://github.com/llvm/llvm-project/pull/145263
More information about the llvm-commits
mailing list