[K/N] LLVM: Transition to opaque pointers

This commit is contained in:
Troels Bjerre Lund
2023-10-19 11:03:22 +02:00
committed by Space Cloud
parent c1f72de6e5
commit b059754f64
22 changed files with 133 additions and 116 deletions
@@ -34,4 +34,9 @@ LLVMValueRef LLVMConstInBoundsGEP2(LLVMTypeRef Ty, LLVMValueRef ConstantVal,
NumIndices);
Constant *Val = unwrap<Constant>(ConstantVal);
return wrap(ConstantExpr::getInBoundsGetElementPtr(unwrap(Ty), Val, IdxList));
}
}
unsigned LLVMGetProgramAddressSpace(LLVMModuleRef moduleRef) {
auto module = unwrap(moduleRef);
return module ? module->getDataLayout().getProgramAddressSpace() : 0;
}
@@ -27,6 +27,8 @@ LLVMValueRef LLVMAddAlias2(LLVMModuleRef M, LLVMTypeRef ValueTy,
unsigned AddrSpace, LLVMValueRef Aliasee,
const char *Name);
unsigned LLVMGetProgramAddressSpace(LLVMModuleRef moduleRef);
# ifdef __cplusplus
}
# endif