mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
llvm-c: Add LLVMIntPtrType{,ForAS}InContext
All of the Core API functions have versions which accept explicit context, in addition to ones which work on global context. This commit adds functions which accept explicit context to the Target API for consistency. Patch by Peter Zotov Differential Revision: http://llvm-reviews.chandlerc.com/D1912 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192913 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -88,6 +88,14 @@ LLVMTypeRef LLVMIntPtrTypeForAS(LLVMTargetDataRef TD, unsigned AS) {
|
||||
return wrap(unwrap(TD)->getIntPtrType(getGlobalContext(), AS));
|
||||
}
|
||||
|
||||
LLVMTypeRef LLVMIntPtrTypeInContext(LLVMContextRef C, LLVMTargetDataRef TD) {
|
||||
return wrap(unwrap(TD)->getIntPtrType(*unwrap(C)));
|
||||
}
|
||||
|
||||
LLVMTypeRef LLVMIntPtrTypeForASInContext(LLVMContextRef C, LLVMTargetDataRef TD, unsigned AS) {
|
||||
return wrap(unwrap(TD)->getIntPtrType(*unwrap(C), AS));
|
||||
}
|
||||
|
||||
unsigned long long LLVMSizeOfTypeInBits(LLVMTargetDataRef TD, LLVMTypeRef Ty) {
|
||||
return unwrap(TD)->getTypeSizeInBits(unwrap(Ty));
|
||||
}
|
||||
|
Reference in New Issue
Block a user