1 //===-- GenericValue.h - Represent any type of LLVM value -------*- C++ -*-===//
3 // The GenericValue class is used to represent an LLVM value of arbitrary type.
5 //===----------------------------------------------------------------------===//
8 #ifndef GENERIC_VALUE_H
9 #define GENERIC_VALUE_H
11 #include "Support/DataTypes.h"
13 typedef uint64_t PointerTy;
17 unsigned char UByteVal;
19 unsigned short UShortVal;
20 signed short ShortVal;
28 unsigned char Untyped[8];
31 GenericValue(void *V) {
32 PointerVal = (PointerTy)(intptr_t)V;
36 inline GenericValue PTOGV(void *P) { return GenericValue(P); }
37 inline void* GVTOP(const GenericValue &GV) {
38 return (void*)(intptr_t)GV.PointerVal;