Lines Matching refs:wrap

83   return wrap(new LLVMContext());  in LLVMContextCreate()
86 LLVMContextRef LLVMGetGlobalContext() { return wrap(&getGlobalContext()); } in LLVMGetGlobalContext()
154 return wrap(Attribute::getWithByValType(Ctx, nullptr)); in LLVMCreateEnumAttribute()
159 return wrap(Attribute::getWithStructRetType(Ctx, nullptr)); in LLVMCreateEnumAttribute()
162 return wrap(Attribute::get(Ctx, AttrKind, Val)); in LLVMCreateEnumAttribute()
180 return wrap(Attribute::get(Ctx, AttrKind, unwrap(type_ref))); in LLVMCreateTypeAttribute()
185 return wrap(Attr.getValueAsType()); in LLVMGetTypeAttributeValue()
191 return wrap(Attribute::get(*unwrap(C), StringRef(K, KLength), in LLVMCreateStringAttribute()
257 return wrap(new Module(ModuleID, getGlobalContext())); in LLVMModuleCreateWithName()
262 return wrap(new Module(ModuleID, *unwrap(C))); in LLVMModuleCreateWithNameInContext()
369 Result[i].Metadata = wrap(ModuleFlag.Val); in LLVMCopyModuleFlagsMetadata()
404 return wrap(unwrap(M)->getModuleFlag({Key, KeyLen})); in LLVMGetModuleFlag()
486 return wrap(InlineAsm::get(unwrap<FunctionType>(Ty), in LLVMGetInlineAsm()
494 return wrap(&unwrap(M)->getContext()); in LLVMGetModuleContext()
556 return wrap(&unwrap(Ty)->getContext()); in LLVMGetTypeContext()
598 return wrap(IntegerType::get(*unwrap(C), NumBits)); in LLVMIntTypeInContext()
691 return wrap(FunctionType::get(unwrap(ReturnType), Tys, IsVarArg != 0)); in LLVMFunctionType()
699 return wrap(unwrap<FunctionType>(FunctionTy)->getReturnType()); in LLVMGetReturnType()
709 *Dest++ = wrap(T); in LLVMGetParamTypes()
717 return wrap(StructType::get(*unwrap(C), Tys, Packed != 0)); in LLVMStructTypeInContext()
728 return wrap(StructType::create(*unwrap(C), Name)); in LLVMStructCreateNamed()
752 *Dest++ = wrap(T); in LLVMGetStructElementTypes()
757 return wrap(Ty->getTypeAtIndex(i)); in LLVMStructGetTypeAtIndex()
773 return wrap(StructType::getTypeByName(unwrap(M)->getContext(), Name)); in LLVMGetTypeByName()
777 return wrap(StructType::getTypeByName(*unwrap(C), Name)); in LLVMGetTypeByName2()
785 Arr[i] = wrap(T); in LLVMGetSubtypes()
791 return wrap(ArrayType::get(unwrap(ElementType), ElementCount)); in LLVMArrayType()
795 return wrap(PointerType::get(unwrap(ElementType), AddressSpace)); in LLVMPointerType()
803 return wrap(FixedVectorType::get(unwrap(ElementType), ElementCount)); in LLVMVectorType()
808 return wrap(ScalableVectorType::get(unwrap(ElementType), ElementCount)); in LLVMScalableVectorType()
814 return wrap(PTy->getNonOpaquePointerElementType()); in LLVMGetElementType()
816 return wrap(ATy->getElementType()); in LLVMGetElementType()
817 return wrap(cast<VectorType>(Ty)->getElementType()); in LLVMGetElementType()
839 return wrap(PointerType::get(*unwrap(C), AddressSpace)); in LLVMPointerTypeInContext()
843 return wrap(Type::getVoidTy(*unwrap(C))); in LLVMVoidTypeInContext()
846 return wrap(Type::getLabelTy(*unwrap(C))); in LLVMLabelTypeInContext()
849 return wrap(Type::getTokenTy(*unwrap(C))); in LLVMTokenTypeInContext()
852 return wrap(Type::getMetadataTy(*unwrap(C))); in LLVMMetadataTypeInContext()
867 return wrap(unwrap(Val)->getType()); in LLVMTypeOf()
930 return wrap(MetadataAsValue::get(I->getContext(), MD)); in LLVMGetMetadata()
972 Result[i].Metadata = wrap(ModuleFlag.second); in llvm_getMetadata()
991 return wrap(static_cast<Value*>(dyn_cast_or_null<name>(unwrap(Val)))); \
1017 return wrap(&*I); in LLVMGetFirstUse()
1023 return wrap(Next); in LLVMGetNextUse()
1028 return wrap(unwrap(U)->getUser()); in LLVMGetUser()
1032 return wrap(unwrap(U)->get()); in LLVMGetUsedValue()
1043 return wrap(C->getValue()); in getMDNodeOperandImpl()
1044 return wrap(MetadataAsValue::get(Context, Op)); in getMDNodeOperandImpl()
1052 return wrap(L->getValue()); in LLVMGetOperand()
1058 return wrap(cast<User>(V)->getOperand(Index)); in LLVMGetOperand()
1063 return wrap(&cast<User>(V)->getOperandUse(Index)); in LLVMGetOperandUse()
1081 return wrap(Constant::getNullValue(unwrap(Ty))); in LLVMConstNull()
1085 return wrap(Constant::getAllOnesValue(unwrap(Ty))); in LLVMConstAllOnes()
1089 return wrap(UndefValue::get(unwrap(Ty))); in LLVMGetUndef()
1093 return wrap(PoisonValue::get(unwrap(Ty))); in LLVMGetPoison()
1115 return wrap(ConstantPointerNull::get(unwrap<PointerType>(Ty))); in LLVMConstPointerNull()
1122 return wrap(MDString::get(*unwrap(C), StringRef(Str, SLen))); in LLVMMDStringInContext2()
1127 return wrap(MDNode::get(*unwrap(C), ArrayRef<Metadata*>(unwrap(MDs), Count))); in LLVMMDNodeInContext2()
1133 return wrap(MetadataAsValue::get( in LLVMMDStringInContext()
1160 return wrap(MetadataAsValue::get(Context, LocalAsMetadata::get(V))); in LLVMMDNodeInContext()
1165 return wrap(MetadataAsValue::get(Context, MDNode::get(Context, MDs))); in LLVMMDNodeInContext()
1173 return wrap(MetadataAsValue::get(*unwrap(C), unwrap(MD))); in LLVMMetadataAsValue()
1179 return wrap(ConstantAsMetadata::get(C)); in LLVMValueAsMetadata()
1181 return wrap(MAV->getMetadata()); in LLVMValueAsMetadata()
1182 return wrap(ValueAsMetadata::get(V)); in LLVMValueAsMetadata()
1207 return wrap(&*I); in LLVMGetFirstNamedMetadata()
1215 return wrap(&*--I); in LLVMGetLastNamedMetadata()
1223 return wrap(&*I); in LLVMGetNextNamedMetadata()
1231 return wrap(&*--I); in LLVMGetPreviousNamedMetadata()
1236 return wrap(unwrap(M)->getNamedMetadata(StringRef(Name, NameLen))); in LLVMGetNamedMetadata()
1241 return wrap(unwrap(M)->getOrInsertNamedMetadata({Name, NameLen})); in LLVMGetOrInsertNamedMetadata()
1253 *Dest = wrap(MDV->getValue()); in LLVMGetMDNodeOperands()
1277 Dest[i] = wrap(MetadataAsValue::get(Context, N->getOperand(i))); in LLVMGetNamedMetadataOperands()
1372 return wrap(ConstantInt::get(unwrap<IntegerType>(IntTy), N, SignExtend != 0)); in LLVMConstInt()
1379 return wrap(ConstantInt::get(Ty->getContext(), in LLVMConstIntOfArbitraryPrecision()
1386 return wrap(ConstantInt::get(unwrap<IntegerType>(IntTy), StringRef(Str), in LLVMConstIntOfString()
1392 return wrap(ConstantInt::get(unwrap<IntegerType>(IntTy), StringRef(Str, SLen), in LLVMConstIntOfStringAndSize()
1397 return wrap(ConstantFP::get(unwrap(RealTy), N)); in LLVMConstReal()
1401 return wrap(ConstantFP::get(unwrap(RealTy), StringRef(Text))); in LLVMConstRealOfString()
1406 return wrap(ConstantFP::get(unwrap(RealTy), StringRef(Str, SLen))); in LLVMConstRealOfStringAndSize()
1441 return wrap(ConstantDataArray::getString(*unwrap(C), StringRef(Str, Length), in LLVMConstStringInContext()
1452 return wrap(unwrap<Constant>(C)->getAggregateElement(Idx)); in LLVMGetAggregateElement()
1456 return wrap(unwrap<ConstantDataSequential>(C)->getElementAsConstant(idx)); in LLVMGetElementAsConstant()
1472 return wrap(ConstantArray::get(ArrayType::get(unwrap(ElementTy), Length), V)); in LLVMConstArray()
1479 return wrap(ConstantStruct::getAnon(*unwrap(C), makeArrayRef(Elements, Count), in LLVMConstStructInContext()
1495 return wrap(ConstantStruct::get(Ty, makeArrayRef(Elements, Count))); in LLVMConstNamedStruct()
1499 return wrap(ConstantVector::get(makeArrayRef( in LLVMConstVector()
1532 return wrap(ConstantExpr::getAlignOf(unwrap(Ty))); in LLVMAlignOf()
1536 return wrap(ConstantExpr::getSizeOf(unwrap(Ty))); in LLVMSizeOf()
1540 return wrap(ConstantExpr::getNeg(unwrap<Constant>(ConstantVal))); in LLVMConstNeg()
1544 return wrap(ConstantExpr::getNSWNeg(unwrap<Constant>(ConstantVal))); in LLVMConstNSWNeg()
1548 return wrap(ConstantExpr::getNUWNeg(unwrap<Constant>(ConstantVal))); in LLVMConstNUWNeg()
1553 return wrap(ConstantExpr::getFNeg(unwrap<Constant>(ConstantVal))); in LLVMConstFNeg()
1557 return wrap(ConstantExpr::getNot(unwrap<Constant>(ConstantVal))); in LLVMConstNot()
1561 return wrap(ConstantExpr::getAdd(unwrap<Constant>(LHSConstant), in LLVMConstAdd()
1567 return wrap(ConstantExpr::getNSWAdd(unwrap<Constant>(LHSConstant), in LLVMConstNSWAdd()
1573 return wrap(ConstantExpr::getNUWAdd(unwrap<Constant>(LHSConstant), in LLVMConstNUWAdd()
1578 return wrap(ConstantExpr::getSub(unwrap<Constant>(LHSConstant), in LLVMConstSub()
1584 return wrap(ConstantExpr::getNSWSub(unwrap<Constant>(LHSConstant), in LLVMConstNSWSub()
1590 return wrap(ConstantExpr::getNUWSub(unwrap<Constant>(LHSConstant), in LLVMConstNUWSub()
1595 return wrap(ConstantExpr::getMul(unwrap<Constant>(LHSConstant), in LLVMConstMul()
1601 return wrap(ConstantExpr::getNSWMul(unwrap<Constant>(LHSConstant), in LLVMConstNSWMul()
1607 return wrap(ConstantExpr::getNUWMul(unwrap<Constant>(LHSConstant), in LLVMConstNUWMul()
1612 return wrap(ConstantExpr::getAnd(unwrap<Constant>(LHSConstant), in LLVMConstAnd()
1617 return wrap(ConstantExpr::getOr(unwrap<Constant>(LHSConstant), in LLVMConstOr()
1622 return wrap(ConstantExpr::getXor(unwrap<Constant>(LHSConstant), in LLVMConstXor()
1628 return wrap(ConstantExpr::getICmp(Predicate, in LLVMConstICmp()
1635 return wrap(ConstantExpr::getFCmp(Predicate, in LLVMConstFCmp()
1641 return wrap(ConstantExpr::getShl(unwrap<Constant>(LHSConstant), in LLVMConstShl()
1646 return wrap(ConstantExpr::getLShr(unwrap<Constant>(LHSConstant), in LLVMConstLShr()
1651 return wrap(ConstantExpr::getAShr(unwrap<Constant>(LHSConstant), in LLVMConstAShr()
1661 return wrap(ConstantExpr::getGetElementPtr(Ty, Val, IdxList)); in LLVMConstGEP()
1669 return wrap(ConstantExpr::getGetElementPtr(unwrap(Ty), Val, IdxList)); in LLVMConstGEP2()
1679 return wrap(ConstantExpr::getInBoundsGetElementPtr(Ty, Val, IdxList)); in LLVMConstInBoundsGEP()
1688 return wrap(ConstantExpr::getInBoundsGetElementPtr(unwrap(Ty), Val, IdxList)); in LLVMConstInBoundsGEP2()
1692 return wrap(ConstantExpr::getTrunc(unwrap<Constant>(ConstantVal), in LLVMConstTrunc()
1697 return wrap(ConstantExpr::getSExt(unwrap<Constant>(ConstantVal), in LLVMConstSExt()
1702 return wrap(ConstantExpr::getZExt(unwrap<Constant>(ConstantVal), in LLVMConstZExt()
1707 return wrap(ConstantExpr::getFPTrunc(unwrap<Constant>(ConstantVal), in LLVMConstFPTrunc()
1712 return wrap(ConstantExpr::getFPExtend(unwrap<Constant>(ConstantVal), in LLVMConstFPExt()
1717 return wrap(ConstantExpr::getUIToFP(unwrap<Constant>(ConstantVal), in LLVMConstUIToFP()
1722 return wrap(ConstantExpr::getSIToFP(unwrap<Constant>(ConstantVal), in LLVMConstSIToFP()
1727 return wrap(ConstantExpr::getFPToUI(unwrap<Constant>(ConstantVal), in LLVMConstFPToUI()
1732 return wrap(ConstantExpr::getFPToSI(unwrap<Constant>(ConstantVal), in LLVMConstFPToSI()
1737 return wrap(ConstantExpr::getPtrToInt(unwrap<Constant>(ConstantVal), in LLVMConstPtrToInt()
1742 return wrap(ConstantExpr::getIntToPtr(unwrap<Constant>(ConstantVal), in LLVMConstIntToPtr()
1747 return wrap(ConstantExpr::getBitCast(unwrap<Constant>(ConstantVal), in LLVMConstBitCast()
1753 return wrap(ConstantExpr::getAddrSpaceCast(unwrap<Constant>(ConstantVal), in LLVMConstAddrSpaceCast()
1759 return wrap(ConstantExpr::getZExtOrBitCast(unwrap<Constant>(ConstantVal), in LLVMConstZExtOrBitCast()
1765 return wrap(ConstantExpr::getSExtOrBitCast(unwrap<Constant>(ConstantVal), in LLVMConstSExtOrBitCast()
1771 return wrap(ConstantExpr::getTruncOrBitCast(unwrap<Constant>(ConstantVal), in LLVMConstTruncOrBitCast()
1777 return wrap(ConstantExpr::getPointerCast(unwrap<Constant>(ConstantVal), in LLVMConstPointerCast()
1783 return wrap(ConstantExpr::getIntegerCast(unwrap<Constant>(ConstantVal), in LLVMConstIntCast()
1788 return wrap(ConstantExpr::getFPCast(unwrap<Constant>(ConstantVal), in LLVMConstFPCast()
1795 return wrap(ConstantExpr::getSelect(unwrap<Constant>(ConstantCondition), in LLVMConstSelect()
1802 return wrap(ConstantExpr::getExtractElement(unwrap<Constant>(VectorConstant), in LLVMConstExtractElement()
1809 return wrap(ConstantExpr::getInsertElement(unwrap<Constant>(VectorConstant), in LLVMConstInsertElement()
1819 return wrap(ConstantExpr::getShuffleVector(unwrap<Constant>(VectorAConstant), in LLVMConstShuffleVector()
1828 return wrap(InlineAsm::get(dyn_cast<FunctionType>(unwrap(Ty)), AsmString, in LLVMConstInlineAsm()
1833 return wrap(BlockAddress::get(unwrap<Function>(F), unwrap(BB))); in LLVMBlockAddress()
1839 return wrap(unwrap<GlobalValue>(Global)->getParent()); in LLVMGetGlobalParent()
2006 return wrap(unwrap<GlobalValue>(Global)->getValueType()); in LLVMGlobalGetValueType()
2098 return wrap(new GlobalVariable(*unwrap(M), unwrap(Ty), false, in LLVMAddGlobal()
2105 return wrap(new GlobalVariable(*unwrap(M), unwrap(Ty), false, in LLVMAddGlobalInAddressSpace()
2112 return wrap(unwrap(M)->getNamedGlobal(Name)); in LLVMGetNamedGlobal()
2120 return wrap(&*I); in LLVMGetFirstGlobal()
2128 return wrap(&*--I); in LLVMGetLastGlobal()
2136 return wrap(&*I); in LLVMGetNextGlobal()
2144 return wrap(&*--I); in LLVMGetPreviousGlobal()
2155 return wrap(GV->getInitializer()); in LLVMGetInitializer()
2231 return wrap(GlobalAlias::create(PTy->getNonOpaquePointerElementType(), in LLVMAddAlias()
2240 return wrap(GlobalAlias::create(unwrap(ValueTy), AddrSpace, in LLVMAddAlias2()
2247 return wrap(unwrap(M)->getNamedAlias(StringRef(Name, NameLen))); in LLVMGetNamedGlobalAlias()
2255 return wrap(&*I); in LLVMGetFirstGlobalAlias()
2263 return wrap(&*--I); in LLVMGetLastGlobalAlias()
2271 return wrap(&*I); in LLVMGetNextGlobalAlias()
2279 return wrap(&*--I); in LLVMGetPreviousGlobalAlias()
2283 return wrap(unwrap<GlobalAlias>(Alias)->getAliasee()); in LLVMAliasGetAliasee()
2294 return wrap(Function::Create(unwrap<FunctionType>(FunctionTy), in LLVMAddFunction()
2299 return wrap(unwrap(M)->getFunction(Name)); in LLVMGetNamedFunction()
2307 return wrap(&*I); in LLVMGetFirstFunction()
2315 return wrap(&*--I); in LLVMGetLastFunction()
2323 return wrap(&*I); in LLVMGetNextFunction()
2331 return wrap(&*--I); in LLVMGetPreviousFunction()
2343 return wrap(unwrap<Function>(Fn)->getPersonalityFn()); in LLVMGetPersonalityFn()
2367 return wrap(llvm::Intrinsic::getDeclaration(unwrap(Mod), IID, Tys)); in LLVMGetIntrinsicDeclaration()
2381 return wrap(llvm::Intrinsic::getType(*unwrap(Ctx), IID, Tys)); in LLVMIntrinsicGetType()
2451 *Attrs++ = wrap(A); in LLVMGetAttributesAtIndex()
2457 return wrap(unwrap<Function>(F)->getAttributeAtIndex( in LLVMGetEnumAttributeAtIndex()
2464 return wrap( in LLVMGetStringAttributeAtIndex()
2496 *ParamRefs++ = wrap(&A); in LLVMGetParams()
2501 return wrap(&Fn->arg_begin()[index]); in LLVMGetParam()
2505 return wrap(unwrap<Argument>(V)->getParent()); in LLVMGetParamParent()
2513 return wrap(&*I); in LLVMGetFirstParam()
2521 return wrap(&*--I); in LLVMGetLastParam()
2529 return wrap(&Fn->arg_begin()[A->getArgNo() + 1]); in LLVMGetNextParam()
2536 return wrap(&A->getParent()->arg_begin()[A->getArgNo() - 1]); in LLVMGetPreviousParam()
2550 return wrap(GlobalIFunc::create(unwrap(Ty), AddrSpace, in LLVMAddGlobalIFunc()
2558 return wrap(unwrap(M)->getNamedIFunc(StringRef(Name, NameLen))); in LLVMGetNamedGlobalIFunc()
2566 return wrap(&*I); in LLVMGetFirstGlobalIFunc()
2574 return wrap(&*--I); in LLVMGetLastGlobalIFunc()
2582 return wrap(&*I); in LLVMGetNextGlobalIFunc()
2590 return wrap(&*--I); in LLVMGetPreviousGlobalIFunc()
2594 return wrap(unwrap<GlobalIFunc>(IFunc)->getResolver()); in LLVMGetGlobalIFuncResolver()
2612 return wrap(static_cast<Value*>(unwrap(BB))); in LLVMBasicBlockAsValue()
2620 return wrap(unwrap<BasicBlock>(Val)); in LLVMValueAsBasicBlock()
2628 return wrap(unwrap(BB)->getParent()); in LLVMGetBasicBlockParent()
2632 return wrap(unwrap(BB)->getTerminator()); in LLVMGetBasicBlockTerminator()
2642 *BasicBlocksRefs++ = wrap(&BB); in LLVMGetBasicBlocks()
2646 return wrap(&unwrap<Function>(Fn)->getEntryBlock()); in LLVMGetEntryBasicBlock()
2654 return wrap(&*I); in LLVMGetFirstBasicBlock()
2662 return wrap(&*--I); in LLVMGetLastBasicBlock()
2670 return wrap(&*I); in LLVMGetNextBasicBlock()
2678 return wrap(&*--I); in LLVMGetPreviousBasicBlock()
2683 return wrap(llvm::BasicBlock::Create(*unwrap(C), Name)); in LLVMCreateBasicBlockInContext()
2703 return wrap(BasicBlock::Create(*unwrap(C), Name, unwrap<Function>(FnRef))); in LLVMAppendBasicBlockInContext()
2714 return wrap(BasicBlock::Create(*unwrap(C), Name, BB->getParent(), BB)); in LLVMInsertBasicBlockInContext()
2741 return wrap(unwrap<Instruction>(Inst)->getParent()); in LLVMGetInstructionParent()
2749 return wrap(&*I); in LLVMGetFirstInstruction()
2757 return wrap(&*--I); in LLVMGetLastInstruction()
2765 return wrap(&*I); in LLVMGetNextInstruction()
2773 return wrap(&*--I); in LLVMGetPreviousInstruction()
2814 return wrap(C->clone()); in LLVMInstructionClone()
2820 return (I && I->isTerminator()) ? wrap(I) : nullptr; in LLVMIsATerminatorInst()
2866 *Attrs++ = wrap(A); in LLVMGetCallSiteAttributes()
2872 return wrap(unwrap<CallBase>(C)->getAttributeAtIndex( in LLVMGetCallSiteEnumAttribute()
2879 return wrap( in LLVMGetCallSiteStringAttribute()
2894 return wrap(unwrap<CallBase>(Instr)->getCalledOperand()); in LLVMGetCalledValue()
2898 return wrap(unwrap<CallBase>(Instr)->getFunctionType()); in LLVMGetCalledFunctionType()
2914 return wrap(unwrap<InvokeInst>(Invoke)->getNormalDest()); in LLVMGetNormalDest()
2919 return wrap(CRI->getUnwindDest()); in LLVMGetUnwindDest()
2921 return wrap(CSI->getUnwindDest()); in LLVMGetUnwindDest()
2923 return wrap(unwrap<InvokeInst>(Invoke)->getUnwindDest()); in LLVMGetUnwindDest()
2946 return wrap(unwrap<Instruction>(Term)->getSuccessor(i)); in LLVMGetSuccessor()
2960 return wrap(unwrap<BranchInst>(Branch)->getCondition()); in LLVMGetCondition()
2970 return wrap(unwrap<SwitchInst>(Switch)->getDefaultDest()); in LLVMGetSwitchDefaultDest()
2976 return wrap(unwrap<AllocaInst>(Alloca)->getAllocatedType()); in LLVMGetAllocatedType()
2990 return wrap(unwrap<GEPOperator>(GEP)->getSourceElementType()); in LLVMGetGEPSourceElementType()
3007 return wrap(unwrap<PHINode>(PhiNode)->getIncomingValue(Index)); in LLVMGetIncomingValue()
3011 return wrap(unwrap<PHINode>(PhiNode)->getIncomingBlock(Index)); in LLVMGetIncomingBlock()
3042 return wrap(new IRBuilder<>(*unwrap(C))); in LLVMCreateBuilderInContext()
3067 return wrap(unwrap(Builder)->GetInsertBlock()); in LLVMGetInsertBlock()
3090 return wrap(unwrap(Builder)->getCurrentDebugLocation().getAsMDNode()); in LLVMGetCurrentDebugLocation2()
3108 return wrap(MetadataAsValue::get( in LLVMGetCurrentDebugLocation()
3129 return wrap(unwrap(Builder)->getDefaultFPMathTag()); in LLVMBuilderGetDefaultFPMathTag()
3135 return wrap(unwrap(B)->CreateRetVoid()); in LLVMBuildRetVoid()
3139 return wrap(unwrap(B)->CreateRet(unwrap(V))); in LLVMBuildRet()
3144 return wrap(unwrap(B)->CreateAggregateRet(unwrap(RetVals), N)); in LLVMBuildAggregateRet()
3148 return wrap(unwrap(B)->CreateBr(unwrap(Dest))); in LLVMBuildBr()
3153 return wrap(unwrap(B)->CreateCondBr(unwrap(If), unwrap(Then), unwrap(Else))); in LLVMBuildCondBr()
3158 return wrap(unwrap(B)->CreateSwitch(unwrap(V), unwrap(Else), NumCases)); in LLVMBuildSwitch()
3163 return wrap(unwrap(B)->CreateIndirectBr(unwrap(Addr), NumDests)); in LLVMBuildIndirectBr()
3174 return wrap( in LLVMBuildInvoke()
3183 return wrap(unwrap(B)->CreateInvoke( in LLVMBuildInvoke2()
3197 return wrap(unwrap(B)->CreateLandingPad(unwrap(Ty), NumClauses, Name)); in LLVMBuildLandingPad()
3203 return wrap(unwrap(B)->CreateCatchPad(unwrap(ParentPad), in LLVMBuildCatchPad()
3213 ParentPad = wrap(Constant::getNullValue(Ty)); in LLVMBuildCleanupPad()
3215 return wrap(unwrap(B)->CreateCleanupPad(unwrap(ParentPad), in LLVMBuildCleanupPad()
3221 return wrap(unwrap(B)->CreateResume(unwrap(Exn))); in LLVMBuildResume()
3229 ParentPad = wrap(Constant::getNullValue(Ty)); in LLVMBuildCatchSwitch()
3231 return wrap(unwrap(B)->CreateCatchSwitch(unwrap(ParentPad), unwrap(UnwindBB), in LLVMBuildCatchSwitch()
3237 return wrap(unwrap(B)->CreateCatchRet(unwrap<CatchPadInst>(CatchPad), in LLVMBuildCatchRet()
3243 return wrap(unwrap(B)->CreateCleanupRet(unwrap<CleanupPadInst>(CatchPad), in LLVMBuildCleanupRet()
3248 return wrap(unwrap(B)->CreateUnreachable()); in LLVMBuildUnreachable()
3265 return wrap(unwrap<LandingPadInst>(LandingPad)->getClause(Idx)); in LLVMGetClause()
3292 *Handlers++ = wrap(H); in LLVMGetHandlers()
3296 return wrap(unwrap<CatchPadInst>(CatchPad)->getCatchSwitch()); in LLVMGetParentCatchSwitch()
3307 return wrap(unwrap<FuncletPadInst>(Funclet)->getArgOperand(i)); in LLVMGetArgOperand()
3318 return wrap(unwrap(B)->CreateAdd(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildAdd()
3323 return wrap(unwrap(B)->CreateNSWAdd(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildNSWAdd()
3328 return wrap(unwrap(B)->CreateNUWAdd(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildNUWAdd()
3333 return wrap(unwrap(B)->CreateFAdd(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildFAdd()
3338 return wrap(unwrap(B)->CreateSub(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildSub()
3343 return wrap(unwrap(B)->CreateNSWSub(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildNSWSub()
3348 return wrap(unwrap(B)->CreateNUWSub(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildNUWSub()
3353 return wrap(unwrap(B)->CreateFSub(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildFSub()
3358 return wrap(unwrap(B)->CreateMul(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildMul()
3363 return wrap(unwrap(B)->CreateNSWMul(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildNSWMul()
3368 return wrap(unwrap(B)->CreateNUWMul(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildNUWMul()
3373 return wrap(unwrap(B)->CreateFMul(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildFMul()
3378 return wrap(unwrap(B)->CreateUDiv(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildUDiv()
3383 return wrap(unwrap(B)->CreateExactUDiv(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildExactUDiv()
3388 return wrap(unwrap(B)->CreateSDiv(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildSDiv()
3393 return wrap(unwrap(B)->CreateExactSDiv(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildExactSDiv()
3398 return wrap(unwrap(B)->CreateFDiv(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildFDiv()
3403 return wrap(unwrap(B)->CreateURem(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildURem()
3408 return wrap(unwrap(B)->CreateSRem(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildSRem()
3413 return wrap(unwrap(B)->CreateFRem(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildFRem()
3418 return wrap(unwrap(B)->CreateShl(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildShl()
3423 return wrap(unwrap(B)->CreateLShr(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildLShr()
3428 return wrap(unwrap(B)->CreateAShr(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildAShr()
3433 return wrap(unwrap(B)->CreateAnd(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildAnd()
3438 return wrap(unwrap(B)->CreateOr(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildOr()
3443 return wrap(unwrap(B)->CreateXor(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildXor()
3449 return wrap(unwrap(B)->CreateBinOp(Instruction::BinaryOps(map_from_llvmopcode(Op)), unwrap(LHS), in LLVMBuildBinOp()
3454 return wrap(unwrap(B)->CreateNeg(unwrap(V), Name)); in LLVMBuildNeg()
3459 return wrap(unwrap(B)->CreateNSWNeg(unwrap(V), Name)); in LLVMBuildNSWNeg()
3464 return wrap(unwrap(B)->CreateNUWNeg(unwrap(V), Name)); in LLVMBuildNUWNeg()
3468 return wrap(unwrap(B)->CreateFNeg(unwrap(V), Name)); in LLVMBuildFNeg()
3472 return wrap(unwrap(B)->CreateNot(unwrap(V), Name)); in LLVMBuildNot()
3485 return wrap(unwrap(B)->Insert(Malloc, Twine(Name))); in LLVMBuildMalloc()
3496 return wrap(unwrap(B)->Insert(Malloc, Twine(Name))); in LLVMBuildArrayMalloc()
3502 return wrap(unwrap(B)->CreateMemSet(unwrap(Ptr), unwrap(Val), unwrap(Len), in LLVMBuildMemSet()
3510 return wrap(unwrap(B)->CreateMemCpy(unwrap(Dst), MaybeAlign(DstAlign), in LLVMBuildMemCpy()
3519 return wrap(unwrap(B)->CreateMemMove(unwrap(Dst), MaybeAlign(DstAlign), in LLVMBuildMemMove()
3526 return wrap(unwrap(B)->CreateAlloca(unwrap(Ty), nullptr, Name)); in LLVMBuildAlloca()
3531 return wrap(unwrap(B)->CreateAlloca(unwrap(Ty), unwrap(Val), Name)); in LLVMBuildArrayAlloca()
3535 return wrap(unwrap(B)->Insert( in LLVMBuildFree()
3544 return wrap( in LLVMBuildLoad()
3550 return wrap(unwrap(B)->CreateLoad(unwrap(Ty), unwrap(PointerVal), Name)); in LLVMBuildLoad2()
3555 return wrap(unwrap(B)->CreateStore(unwrap(Val), unwrap(PointerVal))); in LLVMBuildStore()
3639 return wrap( in LLVMBuildFence()
3652 return wrap(unwrap(B)->CreateGEP(Ty, Val, IdxList, Name)); in LLVMBuildGEP()
3659 return wrap(unwrap(B)->CreateGEP(unwrap(Ty), unwrap(Pointer), IdxList, Name)); in LLVMBuildGEP2()
3668 return wrap(unwrap(B)->CreateInBoundsGEP(Ty, Val, IdxList, Name)); in LLVMBuildInBoundsGEP()
3675 return wrap( in LLVMBuildInBoundsGEP2()
3683 return wrap(unwrap(B)->CreateStructGEP(Ty, Val, Idx, Name)); in LLVMBuildStructGEP()
3689 return wrap( in LLVMBuildStructGEP2()
3695 return wrap(unwrap(B)->CreateGlobalString(Str, Name)); in LLVMBuildGlobalString()
3700 return wrap(unwrap(B)->CreateGlobalStringPtr(Str, Name)); in LLVMBuildGlobalStringPtr()
3766 return wrap(unwrap(B)->CreateTrunc(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildTrunc()
3771 return wrap(unwrap(B)->CreateZExt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildZExt()
3776 return wrap(unwrap(B)->CreateSExt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildSExt()
3781 return wrap(unwrap(B)->CreateFPToUI(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPToUI()
3786 return wrap(unwrap(B)->CreateFPToSI(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPToSI()
3791 return wrap(unwrap(B)->CreateUIToFP(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildUIToFP()
3796 return wrap(unwrap(B)->CreateSIToFP(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildSIToFP()
3801 return wrap(unwrap(B)->CreateFPTrunc(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPTrunc()
3806 return wrap(unwrap(B)->CreateFPExt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPExt()
3811 return wrap(unwrap(B)->CreatePtrToInt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildPtrToInt()
3816 return wrap(unwrap(B)->CreateIntToPtr(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildIntToPtr()
3821 return wrap(unwrap(B)->CreateBitCast(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildBitCast()
3826 return wrap(unwrap(B)->CreateAddrSpaceCast(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildAddrSpaceCast()
3831 return wrap(unwrap(B)->CreateZExtOrBitCast(unwrap(Val), unwrap(DestTy), in LLVMBuildZExtOrBitCast()
3837 return wrap(unwrap(B)->CreateSExtOrBitCast(unwrap(Val), unwrap(DestTy), in LLVMBuildSExtOrBitCast()
3843 return wrap(unwrap(B)->CreateTruncOrBitCast(unwrap(Val), unwrap(DestTy), in LLVMBuildTruncOrBitCast()
3849 return wrap(unwrap(B)->CreateCast(Instruction::CastOps(map_from_llvmopcode(Op)), unwrap(Val), in LLVMBuildCast()
3855 return wrap(unwrap(B)->CreatePointerCast(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildPointerCast()
3861 return wrap( in LLVMBuildIntCast2()
3867 return wrap(unwrap(B)->CreateIntCast(unwrap(Val), unwrap(DestTy), in LLVMBuildIntCast()
3873 return wrap(unwrap(B)->CreateFPCast(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPCast()
3887 return wrap(unwrap(B)->CreateICmp(static_cast<ICmpInst::Predicate>(Op), in LLVMBuildICmp()
3894 return wrap(unwrap(B)->CreateFCmp(static_cast<FCmpInst::Predicate>(Op), in LLVMBuildFCmp()
3901 return wrap(unwrap(B)->CreatePHI(unwrap(Ty), 0, Name)); in LLVMBuildPhi()
3911 return wrap(unwrap(B)->CreateCall(FnT, unwrap(Fn), in LLVMBuildCall()
3919 return wrap(unwrap(B)->CreateCall(FTy, unwrap(Fn), in LLVMBuildCall2()
3926 return wrap(unwrap(B)->CreateSelect(unwrap(If), unwrap(Then), unwrap(Else), in LLVMBuildSelect()
3932 return wrap(unwrap(B)->CreateVAArg(unwrap(List), unwrap(Ty), Name)); in LLVMBuildVAArg()
3937 return wrap(unwrap(B)->CreateExtractElement(unwrap(VecVal), unwrap(Index), in LLVMBuildExtractElement()
3944 return wrap(unwrap(B)->CreateInsertElement(unwrap(VecVal), unwrap(EltVal), in LLVMBuildInsertElement()
3951 return wrap(unwrap(B)->CreateShuffleVector(unwrap(V1), unwrap(V2), in LLVMBuildShuffleVector()
3957 return wrap(unwrap(B)->CreateExtractValue(unwrap(AggVal), Index, Name)); in LLVMBuildExtractValue()
3963 return wrap(unwrap(B)->CreateInsertValue(unwrap(AggVal), unwrap(EltVal), in LLVMBuildInsertValue()
3969 return wrap(unwrap(B)->CreateFreeze(unwrap(Val), Name)); in LLVMBuildFreeze()
3974 return wrap(unwrap(B)->CreateIsNull(unwrap(Val), Name)); in LLVMBuildIsNull()
3979 return wrap(unwrap(B)->CreateIsNotNull(unwrap(Val), Name)); in LLVMBuildIsNotNull()
3986 return wrap(unwrap(B)->CreatePtrDiff(ElemTy, L, unwrap(RHS), Name)); in LLVMBuildPtrDiff()
3992 return wrap(unwrap(B)->CreatePtrDiff(unwrap(ElemTy), unwrap(LHS), in LLVMBuildPtrDiff2()
4001 return wrap(unwrap(B)->CreateAtomicRMW( in LLVMBuildAtomicRMW()
4013 return wrap(unwrap(B)->CreateAtomicCmpXchg( in LLVMBuildAtomicCmpXchg()
4102 *OutMemBuf = wrap(MBOrErr.get().release()); in LLVMCreateMemoryBufferWithContentsOfFile()
4113 *OutMemBuf = wrap(MBOrErr.get().release()); in LLVMCreateMemoryBufferWithSTDIN()
4123 return wrap(MemoryBuffer::getMemBuffer(StringRef(InputData, InputDataLength), in LLVMCreateMemoryBufferWithMemoryRange()
4133 return wrap( in LLVMCreateMemoryBufferWithMemoryRangeCopy()
4153 return wrap(PassRegistry::getPassRegistry()); in LLVMGetGlobalPassRegistry()
4159 return wrap(new legacy::PassManager()); in LLVMCreatePassManager()
4163 return wrap(new legacy::FunctionPassManager(unwrap(M))); in LLVMCreateFunctionPassManagerForModule()