17 #ifndef LLVM_CLANG_CODEGEN_CONSTANTINITFUTURE_H 18 #define LLVM_CLANG_CODEGEN_CONSTANTINITFUTURE_H 20 #include "llvm/ADT/PointerUnion.h" 21 #include "llvm/IR/Constant.h" 28 class ConstantInitBuilderBase;
38 enum { NumLowBitsAvailable = 2 };
48 using PairTy = llvm::PointerUnion<ConstantInitBuilderBase*, llvm::Constant*>;
60 assert(initializer &&
"creating null future");
64 explicit operator bool()
const {
return bool(Data); }
74 void installInGlobal(llvm::GlobalVariable *global);
79 result.Data = PairTy::getFromOpaqueValue(value);
101 return T::getFromOpaqueValue(p);
103 enum { NumLowBitsAvailable = T::NumLowBitsAvailable };
Specialize PointerLikeTypeTraits to allow LazyGenerationalUpdatePtr to be placed into a PointerUnion...
static void * getAsVoidPointer(T future)
static void * getAsVoidPointer(T p)
The l-value was considered opaque, so the alignment was determined from a type.
ConstantInitFuture(llvm::Constant *initializer)
A future can be explicitly created from a fixed initializer.
A "future" for a completed constant initializer, which can be passed around independently of any sub-...
void * getOpaqueValue() const
Dataflow Directional Tag Classes.
static T getFromVoidPointer(void *p)
static ConstantInitFuture getFromOpaqueValue(void *value)
static T getFromVoidPointer(void *p)