llvm.org GIT mirror llvm / a129dc8
[LLVM-C] Publicly expose getters of MetadataType, TokenType Patch by Robert Widmann. Expose getters for MetadataType and TokenType publicly in the C API. Discovered a need for these while trying to wrap the intrinsics API. Differential Revision: https://reviews.llvm.org/D38809 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316762 91177308-0d34-0410-b5e6-96231b3b80d8 whitequark 1 year, 10 months ago
3 changed file(s) with 17 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
11341134 * Create a X86 MMX type in a context.
11351135 */
11361136 LLVMTypeRef LLVMX86MMXTypeInContext(LLVMContextRef C);
1137
1138 /**
1139 * Create a token type in a context.
1140 */
1141 LLVMTypeRef LLVMTokenTypeInContext(LLVMContextRef C);
1142
1143 /**
1144 * Create a metadata type in a context.
1145 */
1146 LLVMTypeRef LLVMMetadataTypeInContext(LLVMContextRef C);
11371147
11381148 /**
11391149 * These are similar to the above functions except they operate on the
451451 LLVMTypeRef LLVMX86MMXTypeInContext(LLVMContextRef C) {
452452 return (LLVMTypeRef) Type::getX86_MMXTy(*unwrap(C));
453453 }
454 LLVMTypeRef LLVMTokenTypeInContext(LLVMContextRef C) {
455 return (LLVMTypeRef) Type::getTokenTy(*unwrap(C));
456 }
457454
458455 LLVMTypeRef LLVMHalfType(void) {
459456 return LLVMHalfTypeInContext(LLVMGetGlobalContext());
618615 }
619616 LLVMTypeRef LLVMLabelTypeInContext(LLVMContextRef C) {
620617 return wrap(Type::getLabelTy(*unwrap(C)));
618 }
619 LLVMTypeRef LLVMTokenTypeInContext(LLVMContextRef C) {
620 return wrap(Type::getTokenTy(*unwrap(C)));
621 }
622 LLVMTypeRef LLVMMetadataTypeInContext(LLVMContextRef C) {
623 return wrap(Type::getMetadataTy(*unwrap(C)));
621624 }
622625
623626 LLVMTypeRef LLVMVoidType(void) {
141141 LLVMGetVectorSize(Src)
142142 );
143143 case LLVMMetadataTypeKind:
144 break;
144 return LLVMMetadataTypeInContext(Ctx);
145145 case LLVMX86_MMXTypeKind:
146146 return LLVMX86MMXTypeInContext(Ctx);
147147 default: