1#ifndef PROTEUS_RUNTIME_CONSTANT_TYPE_HELPERS_H
2#define PROTEUS_RUNTIME_CONSTANT_TYPE_HELPERS_H
6#include <llvm/IR/DerivedTypes.h>
7#include <llvm/IR/Type.h>
22 if (
Ty->isIntegerTy(1))
24 if (
Ty->isIntegerTy(8))
26 if (
Ty->isIntegerTy(32))
28 if (
Ty->isIntegerTy(64))
34 if (
Ty->isFP128Ty() ||
Ty->isPPC_FP128Ty() ||
Ty->isX86_FP80Ty())
36 if (
Ty->isPointerTy())
53 return Type::getInt1Ty(Ctx);
55 return Type::getInt8Ty(Ctx);
57 return Type::getInt32Ty(Ctx);
59 return Type::getInt64Ty(Ctx);
61 return Type::getFloatTy(Ctx);
63 return Type::getDoubleTy(Ctx);
67 return PointerType::getUnqual(Ctx);
88 return sizeof(
long double);
98 return RC.Value.BoolVal;
100 return RC.Value.Int8Val;
102 return RC.Value.Int32Val;
104 return RC.Value.Int64Val;
106 return RC.Value.FloatVal;
108 return RC.Value.DoubleVal;
110 return RC.Value.LongDoubleVal;
132 return "LONG_DOUBLE";
136 return "STATIC_ARRAY";
#define PROTEUS_FATAL_ERROR(x)
Definition Error.h:7
Definition StorageCache.cpp:24
Type * convertRuntimeConstantTypeToLLVMType(RuntimeConstantType RCType, LLVMContext &Ctx)
Definition RuntimeConstantTypeHelpers.h:49
RuntimeConstantType
Definition CompilerInterfaceTypes.h:20
@ ARRAY
Definition CompilerInterfaceTypes.h:33
@ VECTOR
Definition CompilerInterfaceTypes.h:32
@ INT32
Definition CompilerInterfaceTypes.h:25
@ INT64
Definition CompilerInterfaceTypes.h:26
@ FLOAT
Definition CompilerInterfaceTypes.h:27
@ STATIC_ARRAY
Definition CompilerInterfaceTypes.h:31
@ LONG_DOUBLE
Definition CompilerInterfaceTypes.h:29
@ INT8
Definition CompilerInterfaceTypes.h:24
@ BOOL
Definition CompilerInterfaceTypes.h:23
@ OBJECT
Definition CompilerInterfaceTypes.h:34
@ PTR
Definition CompilerInterfaceTypes.h:30
@ DOUBLE
Definition CompilerInterfaceTypes.h:28
T getValue(const RuntimeConstant &RC)
Definition RuntimeConstantTypeHelpers.h:95
T getRuntimeConstantValue(void *Arg)
Definition CompilerInterfaceRuntimeConstantInfo.h:114
RuntimeConstantType convertTypeToRuntimeConstantType(Type *Ty)
Definition RuntimeConstantTypeHelpers.h:21
std::string toString(CodegenOption Option)
Definition Config.hpp:26
bool isScalarRuntimeConstantType(RuntimeConstantType RCType)
Definition RuntimeConstantTypeHelpers.h:148
size_t getSizeInBytes(RuntimeConstantType RCType)
Definition RuntimeConstantTypeHelpers.h:73
Definition CompilerInterfaceTypes.h:72