File indexing completed on 2026-05-10 08:43:54
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef LLVM_EXECUTIONENGINE_GENERICVALUE_H
0014 #define LLVM_EXECUTIONENGINE_GENERICVALUE_H
0015
0016 #include "llvm/ADT/APInt.h"
0017 #include <vector>
0018
0019 namespace llvm {
0020
0021 using PointerTy = void *;
0022
0023 struct GenericValue {
0024 struct IntPair {
0025 unsigned int first;
0026 unsigned int second;
0027 };
0028 union {
0029 double DoubleVal;
0030 float FloatVal;
0031 PointerTy PointerVal;
0032 struct IntPair UIntPairVal;
0033 unsigned char Untyped[8];
0034 };
0035 APInt IntVal;
0036
0037 std::vector<GenericValue> AggregateVal;
0038
0039
0040
0041
0042 GenericValue() : IntVal(1, 0) {
0043 UIntPairVal.first = 0;
0044 UIntPairVal.second = 0;
0045 }
0046 explicit GenericValue(void *V) : PointerVal(V), IntVal(1, 0) {}
0047 };
0048
0049 inline GenericValue PTOGV(void *P) { return GenericValue(P); }
0050 inline void *GVTOP(const GenericValue &GV) { return GV.PointerVal; }
0051
0052 }
0053
0054 #endif