Lines Matching refs:wrap

78   return wrap(new LLVMContext());  in LLVMContextCreate()
81 LLVMContextRef LLVMGetGlobalContext() { return wrap(&*GlobalContext); } in LLVMGetGlobalContext()
145 return wrap(Attribute::getWithByValType(Ctx, NULL)); in LLVMCreateEnumAttribute()
150 return wrap(Attribute::getWithStructRetType(Ctx, NULL)); in LLVMCreateEnumAttribute()
153 return wrap(Attribute::get(Ctx, AttrKind, Val)); in LLVMCreateEnumAttribute()
171 return wrap(Attribute::get(Ctx, AttrKind, unwrap(type_ref))); in LLVMCreateTypeAttribute()
176 return wrap(Attr.getValueAsType()); in LLVMGetTypeAttributeValue()
182 return wrap(Attribute::get(*unwrap(C), StringRef(K, KLength), in LLVMCreateStringAttribute()
248 return wrap(new Module(ModuleID, *GlobalContext)); in LLVMModuleCreateWithName()
253 return wrap(new Module(ModuleID, *unwrap(C))); in LLVMModuleCreateWithNameInContext()
360 Result[i].Metadata = wrap(ModuleFlag.Val); in LLVMCopyModuleFlagsMetadata()
395 return wrap(unwrap(M)->getModuleFlag({Key, KeyLen})); in LLVMGetModuleFlag()
477 return wrap(InlineAsm::get(unwrap<FunctionType>(Ty), in LLVMGetInlineAsm()
485 return wrap(&unwrap(M)->getContext()); in LLVMGetModuleContext()
545 return wrap(&unwrap(Ty)->getContext()); in LLVMGetTypeContext()
587 return wrap(IntegerType::get(*unwrap(C), NumBits)); in LLVMIntTypeInContext()
680 return wrap(FunctionType::get(unwrap(ReturnType), Tys, IsVarArg != 0)); in LLVMFunctionType()
688 return wrap(unwrap<FunctionType>(FunctionTy)->getReturnType()); in LLVMGetReturnType()
698 *Dest++ = wrap(T); in LLVMGetParamTypes()
706 return wrap(StructType::get(*unwrap(C), Tys, Packed != 0)); in LLVMStructTypeInContext()
717 return wrap(StructType::create(*unwrap(C), Name)); in LLVMStructCreateNamed()
741 *Dest++ = wrap(T); in LLVMGetStructElementTypes()
746 return wrap(Ty->getTypeAtIndex(i)); in LLVMStructGetTypeAtIndex()
762 return wrap(StructType::getTypeByName(unwrap(M)->getContext(), Name)); in LLVMGetTypeByName()
766 return wrap(StructType::getTypeByName(*unwrap(C), Name)); in LLVMGetTypeByName2()
774 Arr[i] = wrap(T); in LLVMGetSubtypes()
780 return wrap(ArrayType::get(unwrap(ElementType), ElementCount)); in LLVMArrayType()
784 return wrap(PointerType::get(unwrap(ElementType), AddressSpace)); in LLVMPointerType()
788 return wrap(FixedVectorType::get(unwrap(ElementType), ElementCount)); in LLVMVectorType()
793 return wrap(ScalableVectorType::get(unwrap(ElementType), ElementCount)); in LLVMScalableVectorType()
799 return wrap(PTy->getElementType()); in LLVMGetElementType()
801 return wrap(ATy->getElementType()); in LLVMGetElementType()
802 return wrap(cast<VectorType>(Ty)->getElementType()); in LLVMGetElementType()
824 return wrap(Type::getVoidTy(*unwrap(C))); in LLVMVoidTypeInContext()
827 return wrap(Type::getLabelTy(*unwrap(C))); in LLVMLabelTypeInContext()
830 return wrap(Type::getTokenTy(*unwrap(C))); in LLVMTokenTypeInContext()
833 return wrap(Type::getMetadataTy(*unwrap(C))); in LLVMMetadataTypeInContext()
848 return wrap(unwrap(Val)->getType()); in LLVMTypeOf()
911 return wrap(MetadataAsValue::get(I->getContext(), MD)); in LLVMGetMetadata()
953 Result[i].Metadata = wrap(ModuleFlag.second); in llvm_getMetadata()
972 return wrap(static_cast<Value*>(dyn_cast_or_null<name>(unwrap(Val)))); \
998 return wrap(&*I); in LLVMGetFirstUse()
1004 return wrap(Next); in LLVMGetNextUse()
1009 return wrap(unwrap(U)->getUser()); in LLVMGetUser()
1013 return wrap(unwrap(U)->get()); in LLVMGetUsedValue()
1024 return wrap(C->getValue()); in getMDNodeOperandImpl()
1025 return wrap(MetadataAsValue::get(Context, Op)); in getMDNodeOperandImpl()
1033 return wrap(L->getValue()); in LLVMGetOperand()
1039 return wrap(cast<User>(V)->getOperand(Index)); in LLVMGetOperand()
1044 return wrap(&cast<User>(V)->getOperandUse(Index)); in LLVMGetOperandUse()
1062 return wrap(Constant::getNullValue(unwrap(Ty))); in LLVMConstNull()
1066 return wrap(Constant::getAllOnesValue(unwrap(Ty))); in LLVMConstAllOnes()
1070 return wrap(UndefValue::get(unwrap(Ty))); in LLVMGetUndef()
1074 return wrap(PoisonValue::get(unwrap(Ty))); in LLVMGetPoison()
1096 return wrap(ConstantPointerNull::get(unwrap<PointerType>(Ty))); in LLVMConstPointerNull()
1103 return wrap(MDString::get(*unwrap(C), StringRef(Str, SLen))); in LLVMMDStringInContext2()
1108 return wrap(MDNode::get(*unwrap(C), ArrayRef<Metadata*>(unwrap(MDs), Count))); in LLVMMDNodeInContext2()
1114 return wrap(MetadataAsValue::get( in LLVMMDStringInContext()
1141 return wrap(MetadataAsValue::get(Context, LocalAsMetadata::get(V))); in LLVMMDNodeInContext()
1146 return wrap(MetadataAsValue::get(Context, MDNode::get(Context, MDs))); in LLVMMDNodeInContext()
1154 return wrap(MetadataAsValue::get(*unwrap(C), unwrap(MD))); in LLVMMetadataAsValue()
1160 return wrap(ConstantAsMetadata::get(C)); in LLVMValueAsMetadata()
1162 return wrap(MAV->getMetadata()); in LLVMValueAsMetadata()
1163 return wrap(ValueAsMetadata::get(V)); in LLVMValueAsMetadata()
1188 return wrap(&*I); in LLVMGetFirstNamedMetadata()
1196 return wrap(&*--I); in LLVMGetLastNamedMetadata()
1204 return wrap(&*I); in LLVMGetNextNamedMetadata()
1212 return wrap(&*--I); in LLVMGetPreviousNamedMetadata()
1217 return wrap(unwrap(M)->getNamedMetadata(StringRef(Name, NameLen))); in LLVMGetNamedMetadata()
1222 return wrap(unwrap(M)->getOrInsertNamedMetadata({Name, NameLen})); in LLVMGetOrInsertNamedMetadata()
1234 *Dest = wrap(MDV->getValue()); in LLVMGetMDNodeOperands()
1258 Dest[i] = wrap(MetadataAsValue::get(Context, N->getOperand(i))); in LLVMGetNamedMetadataOperands()
1353 return wrap(ConstantInt::get(unwrap<IntegerType>(IntTy), N, SignExtend != 0)); in LLVMConstInt()
1360 return wrap(ConstantInt::get(Ty->getContext(), in LLVMConstIntOfArbitraryPrecision()
1367 return wrap(ConstantInt::get(unwrap<IntegerType>(IntTy), StringRef(Str), in LLVMConstIntOfString()
1373 return wrap(ConstantInt::get(unwrap<IntegerType>(IntTy), StringRef(Str, SLen), in LLVMConstIntOfStringAndSize()
1378 return wrap(ConstantFP::get(unwrap(RealTy), N)); in LLVMConstReal()
1382 return wrap(ConstantFP::get(unwrap(RealTy), StringRef(Text))); in LLVMConstRealOfString()
1387 return wrap(ConstantFP::get(unwrap(RealTy), StringRef(Str, SLen))); in LLVMConstRealOfStringAndSize()
1422 return wrap(ConstantDataArray::getString(*unwrap(C), StringRef(Str, Length), in LLVMConstStringInContext()
1433 return wrap(unwrap<ConstantDataSequential>(C)->getElementAsConstant(idx)); in LLVMGetElementAsConstant()
1449 return wrap(ConstantArray::get(ArrayType::get(unwrap(ElementTy), Length), V)); in LLVMConstArray()
1456 return wrap(ConstantStruct::getAnon(*unwrap(C), makeArrayRef(Elements, Count), in LLVMConstStructInContext()
1472 return wrap(ConstantStruct::get(Ty, makeArrayRef(Elements, Count))); in LLVMConstNamedStruct()
1476 return wrap(ConstantVector::get(makeArrayRef( in LLVMConstVector()
1509 return wrap(ConstantExpr::getAlignOf(unwrap(Ty))); in LLVMAlignOf()
1513 return wrap(ConstantExpr::getSizeOf(unwrap(Ty))); in LLVMSizeOf()
1517 return wrap(ConstantExpr::getNeg(unwrap<Constant>(ConstantVal))); in LLVMConstNeg()
1521 return wrap(ConstantExpr::getNSWNeg(unwrap<Constant>(ConstantVal))); in LLVMConstNSWNeg()
1525 return wrap(ConstantExpr::getNUWNeg(unwrap<Constant>(ConstantVal))); in LLVMConstNUWNeg()
1530 return wrap(ConstantExpr::getFNeg(unwrap<Constant>(ConstantVal))); in LLVMConstFNeg()
1534 return wrap(ConstantExpr::getNot(unwrap<Constant>(ConstantVal))); in LLVMConstNot()
1538 return wrap(ConstantExpr::getAdd(unwrap<Constant>(LHSConstant), in LLVMConstAdd()
1544 return wrap(ConstantExpr::getNSWAdd(unwrap<Constant>(LHSConstant), in LLVMConstNSWAdd()
1550 return wrap(ConstantExpr::getNUWAdd(unwrap<Constant>(LHSConstant), in LLVMConstNUWAdd()
1555 return wrap(ConstantExpr::getFAdd(unwrap<Constant>(LHSConstant), in LLVMConstFAdd()
1560 return wrap(ConstantExpr::getSub(unwrap<Constant>(LHSConstant), in LLVMConstSub()
1566 return wrap(ConstantExpr::getNSWSub(unwrap<Constant>(LHSConstant), in LLVMConstNSWSub()
1572 return wrap(ConstantExpr::getNUWSub(unwrap<Constant>(LHSConstant), in LLVMConstNUWSub()
1577 return wrap(ConstantExpr::getFSub(unwrap<Constant>(LHSConstant), in LLVMConstFSub()
1582 return wrap(ConstantExpr::getMul(unwrap<Constant>(LHSConstant), in LLVMConstMul()
1588 return wrap(ConstantExpr::getNSWMul(unwrap<Constant>(LHSConstant), in LLVMConstNSWMul()
1594 return wrap(ConstantExpr::getNUWMul(unwrap<Constant>(LHSConstant), in LLVMConstNUWMul()
1599 return wrap(ConstantExpr::getFMul(unwrap<Constant>(LHSConstant), in LLVMConstFMul()
1604 return wrap(ConstantExpr::getUDiv(unwrap<Constant>(LHSConstant), in LLVMConstUDiv()
1610 return wrap(ConstantExpr::getExactUDiv(unwrap<Constant>(LHSConstant), in LLVMConstExactUDiv()
1615 return wrap(ConstantExpr::getSDiv(unwrap<Constant>(LHSConstant), in LLVMConstSDiv()
1621 return wrap(ConstantExpr::getExactSDiv(unwrap<Constant>(LHSConstant), in LLVMConstExactSDiv()
1626 return wrap(ConstantExpr::getFDiv(unwrap<Constant>(LHSConstant), in LLVMConstFDiv()
1631 return wrap(ConstantExpr::getURem(unwrap<Constant>(LHSConstant), in LLVMConstURem()
1636 return wrap(ConstantExpr::getSRem(unwrap<Constant>(LHSConstant), in LLVMConstSRem()
1641 return wrap(ConstantExpr::getFRem(unwrap<Constant>(LHSConstant), in LLVMConstFRem()
1646 return wrap(ConstantExpr::getAnd(unwrap<Constant>(LHSConstant), in LLVMConstAnd()
1651 return wrap(ConstantExpr::getOr(unwrap<Constant>(LHSConstant), in LLVMConstOr()
1656 return wrap(ConstantExpr::getXor(unwrap<Constant>(LHSConstant), in LLVMConstXor()
1662 return wrap(ConstantExpr::getICmp(Predicate, in LLVMConstICmp()
1669 return wrap(ConstantExpr::getFCmp(Predicate, in LLVMConstFCmp()
1675 return wrap(ConstantExpr::getShl(unwrap<Constant>(LHSConstant), in LLVMConstShl()
1680 return wrap(ConstantExpr::getLShr(unwrap<Constant>(LHSConstant), in LLVMConstLShr()
1685 return wrap(ConstantExpr::getAShr(unwrap<Constant>(LHSConstant), in LLVMConstAShr()
1696 return wrap(ConstantExpr::getGetElementPtr(Ty, Val, IdxList)); in LLVMConstGEP()
1707 return wrap(ConstantExpr::getInBoundsGetElementPtr(Ty, Val, IdxList)); in LLVMConstInBoundsGEP()
1711 return wrap(ConstantExpr::getTrunc(unwrap<Constant>(ConstantVal), in LLVMConstTrunc()
1716 return wrap(ConstantExpr::getSExt(unwrap<Constant>(ConstantVal), in LLVMConstSExt()
1721 return wrap(ConstantExpr::getZExt(unwrap<Constant>(ConstantVal), in LLVMConstZExt()
1726 return wrap(ConstantExpr::getFPTrunc(unwrap<Constant>(ConstantVal), in LLVMConstFPTrunc()
1731 return wrap(ConstantExpr::getFPExtend(unwrap<Constant>(ConstantVal), in LLVMConstFPExt()
1736 return wrap(ConstantExpr::getUIToFP(unwrap<Constant>(ConstantVal), in LLVMConstUIToFP()
1741 return wrap(ConstantExpr::getSIToFP(unwrap<Constant>(ConstantVal), in LLVMConstSIToFP()
1746 return wrap(ConstantExpr::getFPToUI(unwrap<Constant>(ConstantVal), in LLVMConstFPToUI()
1751 return wrap(ConstantExpr::getFPToSI(unwrap<Constant>(ConstantVal), in LLVMConstFPToSI()
1756 return wrap(ConstantExpr::getPtrToInt(unwrap<Constant>(ConstantVal), in LLVMConstPtrToInt()
1761 return wrap(ConstantExpr::getIntToPtr(unwrap<Constant>(ConstantVal), in LLVMConstIntToPtr()
1766 return wrap(ConstantExpr::getBitCast(unwrap<Constant>(ConstantVal), in LLVMConstBitCast()
1772 return wrap(ConstantExpr::getAddrSpaceCast(unwrap<Constant>(ConstantVal), in LLVMConstAddrSpaceCast()
1778 return wrap(ConstantExpr::getZExtOrBitCast(unwrap<Constant>(ConstantVal), in LLVMConstZExtOrBitCast()
1784 return wrap(ConstantExpr::getSExtOrBitCast(unwrap<Constant>(ConstantVal), in LLVMConstSExtOrBitCast()
1790 return wrap(ConstantExpr::getTruncOrBitCast(unwrap<Constant>(ConstantVal), in LLVMConstTruncOrBitCast()
1796 return wrap(ConstantExpr::getPointerCast(unwrap<Constant>(ConstantVal), in LLVMConstPointerCast()
1802 return wrap(ConstantExpr::getIntegerCast(unwrap<Constant>(ConstantVal), in LLVMConstIntCast()
1807 return wrap(ConstantExpr::getFPCast(unwrap<Constant>(ConstantVal), in LLVMConstFPCast()
1814 return wrap(ConstantExpr::getSelect(unwrap<Constant>(ConstantCondition), in LLVMConstSelect()
1821 return wrap(ConstantExpr::getExtractElement(unwrap<Constant>(VectorConstant), in LLVMConstExtractElement()
1828 return wrap(ConstantExpr::getInsertElement(unwrap<Constant>(VectorConstant), in LLVMConstInsertElement()
1838 return wrap(ConstantExpr::getShuffleVector(unwrap<Constant>(VectorAConstant), in LLVMConstShuffleVector()
1845 return wrap(ConstantExpr::getExtractValue(unwrap<Constant>(AggConstant), in LLVMConstExtractValue()
1852 return wrap(ConstantExpr::getInsertValue(unwrap<Constant>(AggConstant), in LLVMConstInsertValue()
1861 return wrap(InlineAsm::get(dyn_cast<FunctionType>(unwrap(Ty)), AsmString, in LLVMConstInlineAsm()
1866 return wrap(BlockAddress::get(unwrap<Function>(F), unwrap(BB))); in LLVMBlockAddress()
1872 return wrap(unwrap<GlobalValue>(Global)->getParent()); in LLVMGetGlobalParent()
2039 return wrap(unwrap<GlobalValue>(Global)->getValueType()); in LLVMGlobalGetValueType()
2131 return wrap(new GlobalVariable(*unwrap(M), unwrap(Ty), false, in LLVMAddGlobal()
2138 return wrap(new GlobalVariable(*unwrap(M), unwrap(Ty), false, in LLVMAddGlobalInAddressSpace()
2145 return wrap(unwrap(M)->getNamedGlobal(Name)); in LLVMGetNamedGlobal()
2153 return wrap(&*I); in LLVMGetFirstGlobal()
2161 return wrap(&*--I); in LLVMGetLastGlobal()
2169 return wrap(&*I); in LLVMGetNextGlobal()
2177 return wrap(&*--I); in LLVMGetPreviousGlobal()
2188 return wrap(GV->getInitializer()); in LLVMGetInitializer()
2264 return wrap(GlobalAlias::create(PTy->getElementType(), PTy->getAddressSpace(), in LLVMAddAlias()
2271 return wrap(unwrap(M)->getNamedAlias(Name)); in LLVMGetNamedGlobalAlias()
2279 return wrap(&*I); in LLVMGetFirstGlobalAlias()
2287 return wrap(&*--I); in LLVMGetLastGlobalAlias()
2295 return wrap(&*I); in LLVMGetNextGlobalAlias()
2303 return wrap(&*--I); in LLVMGetPreviousGlobalAlias()
2307 return wrap(unwrap<GlobalAlias>(Alias)->getAliasee()); in LLVMAliasGetAliasee()
2318 return wrap(Function::Create(unwrap<FunctionType>(FunctionTy), in LLVMAddFunction()
2323 return wrap(unwrap(M)->getFunction(Name)); in LLVMGetNamedFunction()
2331 return wrap(&*I); in LLVMGetFirstFunction()
2339 return wrap(&*--I); in LLVMGetLastFunction()
2347 return wrap(&*I); in LLVMGetNextFunction()
2355 return wrap(&*--I); in LLVMGetPreviousFunction()
2367 return wrap(unwrap<Function>(Fn)->getPersonalityFn()); in LLVMGetPersonalityFn()
2391 return wrap(llvm::Intrinsic::getDeclaration(unwrap(Mod), IID, Tys)); in LLVMGetIntrinsicDeclaration()
2405 return wrap(llvm::Intrinsic::getType(*unwrap(Ctx), IID, Tys)); in LLVMIntrinsicGetType()
2475 *Attrs++ = wrap(A); in LLVMGetAttributesAtIndex()
2481 return wrap(unwrap<Function>(F)->getAttribute(Idx, in LLVMGetEnumAttributeAtIndex()
2488 return wrap(unwrap<Function>(F)->getAttribute(Idx, StringRef(K, KLen))); in LLVMGetStringAttributeAtIndex()
2519 *ParamRefs++ = wrap(&A); in LLVMGetParams()
2524 return wrap(&Fn->arg_begin()[index]); in LLVMGetParam()
2528 return wrap(unwrap<Argument>(V)->getParent()); in LLVMGetParamParent()
2536 return wrap(&*I); in LLVMGetFirstParam()
2544 return wrap(&*--I); in LLVMGetLastParam()
2552 return wrap(&Fn->arg_begin()[A->getArgNo() + 1]); in LLVMGetNextParam()
2559 return wrap(&A->getParent()->arg_begin()[A->getArgNo() - 1]); in LLVMGetPreviousParam()
2573 return wrap(GlobalIFunc::create(unwrap(Ty), AddrSpace, in LLVMAddGlobalIFunc()
2581 return wrap(unwrap(M)->getNamedIFunc(StringRef(Name, NameLen))); in LLVMGetNamedGlobalIFunc()
2589 return wrap(&*I); in LLVMGetFirstGlobalIFunc()
2597 return wrap(&*--I); in LLVMGetLastGlobalIFunc()
2605 return wrap(&*I); in LLVMGetNextGlobalIFunc()
2613 return wrap(&*--I); in LLVMGetPreviousGlobalIFunc()
2617 return wrap(unwrap<GlobalIFunc>(IFunc)->getResolver()); in LLVMGetGlobalIFuncResolver()
2635 return wrap(static_cast<Value*>(unwrap(BB))); in LLVMBasicBlockAsValue()
2643 return wrap(unwrap<BasicBlock>(Val)); in LLVMValueAsBasicBlock()
2651 return wrap(unwrap(BB)->getParent()); in LLVMGetBasicBlockParent()
2655 return wrap(unwrap(BB)->getTerminator()); in LLVMGetBasicBlockTerminator()
2665 *BasicBlocksRefs++ = wrap(&BB); in LLVMGetBasicBlocks()
2669 return wrap(&unwrap<Function>(Fn)->getEntryBlock()); in LLVMGetEntryBasicBlock()
2677 return wrap(&*I); in LLVMGetFirstBasicBlock()
2685 return wrap(&*--I); in LLVMGetLastBasicBlock()
2693 return wrap(&*I); in LLVMGetNextBasicBlock()
2701 return wrap(&*--I); in LLVMGetPreviousBasicBlock()
2706 return wrap(llvm::BasicBlock::Create(*unwrap(C), Name)); in LLVMCreateBasicBlockInContext()
2726 return wrap(BasicBlock::Create(*unwrap(C), Name, unwrap<Function>(FnRef))); in LLVMAppendBasicBlockInContext()
2737 return wrap(BasicBlock::Create(*unwrap(C), Name, BB->getParent(), BB)); in LLVMInsertBasicBlockInContext()
2764 return wrap(unwrap<Instruction>(Inst)->getParent()); in LLVMGetInstructionParent()
2772 return wrap(&*I); in LLVMGetFirstInstruction()
2780 return wrap(&*--I); in LLVMGetLastInstruction()
2788 return wrap(&*I); in LLVMGetNextInstruction()
2796 return wrap(&*--I); in LLVMGetPreviousInstruction()
2833 return wrap(C->clone()); in LLVMInstructionClone()
2839 return (I && I->isTerminator()) ? wrap(I) : nullptr; in LLVMIsATerminatorInst()
2885 *Attrs++ = wrap(A); in LLVMGetCallSiteAttributes()
2891 return wrap( in LLVMGetCallSiteEnumAttribute()
2898 return wrap(unwrap<CallBase>(C)->getAttribute(Idx, StringRef(K, KLen))); in LLVMGetCallSiteStringAttribute()
2912 return wrap(unwrap<CallBase>(Instr)->getCalledOperand()); in LLVMGetCalledValue()
2916 return wrap(unwrap<CallBase>(Instr)->getFunctionType()); in LLVMGetCalledFunctionType()
2932 return wrap(unwrap<InvokeInst>(Invoke)->getNormalDest()); in LLVMGetNormalDest()
2937 return wrap(CRI->getUnwindDest()); in LLVMGetUnwindDest()
2939 return wrap(CSI->getUnwindDest()); in LLVMGetUnwindDest()
2941 return wrap(unwrap<InvokeInst>(Invoke)->getUnwindDest()); in LLVMGetUnwindDest()
2964 return wrap(unwrap<Instruction>(Term)->getSuccessor(i)); in LLVMGetSuccessor()
2978 return wrap(unwrap<BranchInst>(Branch)->getCondition()); in LLVMGetCondition()
2988 return wrap(unwrap<SwitchInst>(Switch)->getDefaultDest()); in LLVMGetSwitchDefaultDest()
2994 return wrap(unwrap<AllocaInst>(Alloca)->getAllocatedType()); in LLVMGetAllocatedType()
3021 return wrap(unwrap<PHINode>(PhiNode)->getIncomingValue(Index)); in LLVMGetIncomingValue()
3025 return wrap(unwrap<PHINode>(PhiNode)->getIncomingBlock(Index)); in LLVMGetIncomingBlock()
3060 return wrap(new IRBuilder<>(*unwrap(C))); in LLVMCreateBuilderInContext()
3085 return wrap(unwrap(Builder)->GetInsertBlock()); in LLVMGetInsertBlock()
3108 return wrap(unwrap(Builder)->getCurrentDebugLocation().getAsMDNode()); in LLVMGetCurrentDebugLocation2()
3126 return wrap(MetadataAsValue::get( in LLVMGetCurrentDebugLocation()
3143 return wrap(unwrap(Builder)->getDefaultFPMathTag()); in LLVMBuilderGetDefaultFPMathTag()
3149 return wrap(unwrap(B)->CreateRetVoid()); in LLVMBuildRetVoid()
3153 return wrap(unwrap(B)->CreateRet(unwrap(V))); in LLVMBuildRet()
3158 return wrap(unwrap(B)->CreateAggregateRet(unwrap(RetVals), N)); in LLVMBuildAggregateRet()
3162 return wrap(unwrap(B)->CreateBr(unwrap(Dest))); in LLVMBuildBr()
3167 return wrap(unwrap(B)->CreateCondBr(unwrap(If), unwrap(Then), unwrap(Else))); in LLVMBuildCondBr()
3172 return wrap(unwrap(B)->CreateSwitch(unwrap(V), unwrap(Else), NumCases)); in LLVMBuildSwitch()
3177 return wrap(unwrap(B)->CreateIndirectBr(unwrap(Addr), NumDests)); in LLVMBuildIndirectBr()
3188 return wrap( in LLVMBuildInvoke()
3197 return wrap(unwrap(B)->CreateInvoke( in LLVMBuildInvoke2()
3211 return wrap(unwrap(B)->CreateLandingPad(unwrap(Ty), NumClauses, Name)); in LLVMBuildLandingPad()
3217 return wrap(unwrap(B)->CreateCatchPad(unwrap(ParentPad), in LLVMBuildCatchPad()
3227 ParentPad = wrap(Constant::getNullValue(Ty)); in LLVMBuildCleanupPad()
3229 return wrap(unwrap(B)->CreateCleanupPad(unwrap(ParentPad), in LLVMBuildCleanupPad()
3235 return wrap(unwrap(B)->CreateResume(unwrap(Exn))); in LLVMBuildResume()
3243 ParentPad = wrap(Constant::getNullValue(Ty)); in LLVMBuildCatchSwitch()
3245 return wrap(unwrap(B)->CreateCatchSwitch(unwrap(ParentPad), unwrap(UnwindBB), in LLVMBuildCatchSwitch()
3251 return wrap(unwrap(B)->CreateCatchRet(unwrap<CatchPadInst>(CatchPad), in LLVMBuildCatchRet()
3257 return wrap(unwrap(B)->CreateCleanupRet(unwrap<CleanupPadInst>(CatchPad), in LLVMBuildCleanupRet()
3262 return wrap(unwrap(B)->CreateUnreachable()); in LLVMBuildUnreachable()
3279 return wrap(unwrap<LandingPadInst>(LandingPad)->getClause(Idx)); in LLVMGetClause()
3306 *Handlers++ = wrap(H); in LLVMGetHandlers()
3310 return wrap(unwrap<CatchPadInst>(CatchPad)->getCatchSwitch()); in LLVMGetParentCatchSwitch()
3321 return wrap(unwrap<FuncletPadInst>(Funclet)->getArgOperand(i)); in LLVMGetArgOperand()
3332 return wrap(unwrap(B)->CreateAdd(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildAdd()
3337 return wrap(unwrap(B)->CreateNSWAdd(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildNSWAdd()
3342 return wrap(unwrap(B)->CreateNUWAdd(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildNUWAdd()
3347 return wrap(unwrap(B)->CreateFAdd(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildFAdd()
3352 return wrap(unwrap(B)->CreateSub(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildSub()
3357 return wrap(unwrap(B)->CreateNSWSub(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildNSWSub()
3362 return wrap(unwrap(B)->CreateNUWSub(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildNUWSub()
3367 return wrap(unwrap(B)->CreateFSub(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildFSub()
3372 return wrap(unwrap(B)->CreateMul(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildMul()
3377 return wrap(unwrap(B)->CreateNSWMul(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildNSWMul()
3382 return wrap(unwrap(B)->CreateNUWMul(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildNUWMul()
3387 return wrap(unwrap(B)->CreateFMul(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildFMul()
3392 return wrap(unwrap(B)->CreateUDiv(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildUDiv()
3397 return wrap(unwrap(B)->CreateExactUDiv(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildExactUDiv()
3402 return wrap(unwrap(B)->CreateSDiv(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildSDiv()
3407 return wrap(unwrap(B)->CreateExactSDiv(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildExactSDiv()
3412 return wrap(unwrap(B)->CreateFDiv(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildFDiv()
3417 return wrap(unwrap(B)->CreateURem(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildURem()
3422 return wrap(unwrap(B)->CreateSRem(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildSRem()
3427 return wrap(unwrap(B)->CreateFRem(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildFRem()
3432 return wrap(unwrap(B)->CreateShl(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildShl()
3437 return wrap(unwrap(B)->CreateLShr(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildLShr()
3442 return wrap(unwrap(B)->CreateAShr(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildAShr()
3447 return wrap(unwrap(B)->CreateAnd(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildAnd()
3452 return wrap(unwrap(B)->CreateOr(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildOr()
3457 return wrap(unwrap(B)->CreateXor(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildXor()
3463 return wrap(unwrap(B)->CreateBinOp(Instruction::BinaryOps(map_from_llvmopcode(Op)), unwrap(LHS), in LLVMBuildBinOp()
3468 return wrap(unwrap(B)->CreateNeg(unwrap(V), Name)); in LLVMBuildNeg()
3473 return wrap(unwrap(B)->CreateNSWNeg(unwrap(V), Name)); in LLVMBuildNSWNeg()
3478 return wrap(unwrap(B)->CreateNUWNeg(unwrap(V), Name)); in LLVMBuildNUWNeg()
3482 return wrap(unwrap(B)->CreateFNeg(unwrap(V), Name)); in LLVMBuildFNeg()
3486 return wrap(unwrap(B)->CreateNot(unwrap(V), Name)); in LLVMBuildNot()
3499 return wrap(unwrap(B)->Insert(Malloc, Twine(Name))); in LLVMBuildMalloc()
3510 return wrap(unwrap(B)->Insert(Malloc, Twine(Name))); in LLVMBuildArrayMalloc()
3516 return wrap(unwrap(B)->CreateMemSet(unwrap(Ptr), unwrap(Val), unwrap(Len), in LLVMBuildMemSet()
3524 return wrap(unwrap(B)->CreateMemCpy(unwrap(Dst), MaybeAlign(DstAlign), in LLVMBuildMemCpy()
3533 return wrap(unwrap(B)->CreateMemMove(unwrap(Dst), MaybeAlign(DstAlign), in LLVMBuildMemMove()
3540 return wrap(unwrap(B)->CreateAlloca(unwrap(Ty), nullptr, Name)); in LLVMBuildAlloca()
3545 return wrap(unwrap(B)->CreateAlloca(unwrap(Ty), unwrap(Val), Name)); in LLVMBuildArrayAlloca()
3549 return wrap(unwrap(B)->Insert( in LLVMBuildFree()
3558 return wrap(unwrap(B)->CreateLoad(Ty->getElementType(), V, Name)); in LLVMBuildLoad()
3563 return wrap(unwrap(B)->CreateLoad(unwrap(Ty), unwrap(PointerVal), Name)); in LLVMBuildLoad2()
3568 return wrap(unwrap(B)->CreateStore(unwrap(Val), unwrap(PointerVal))); in LLVMBuildStore()
3648 return wrap( in LLVMBuildFence()
3662 return wrap(unwrap(B)->CreateGEP(Ty, Val, IdxList, Name)); in LLVMBuildGEP()
3669 return wrap(unwrap(B)->CreateGEP(unwrap(Ty), unwrap(Pointer), IdxList, Name)); in LLVMBuildGEP2()
3679 return wrap(unwrap(B)->CreateInBoundsGEP(Ty, Val, IdxList, Name)); in LLVMBuildInBoundsGEP()
3686 return wrap( in LLVMBuildInBoundsGEP2()
3695 return wrap(unwrap(B)->CreateStructGEP(Ty, Val, Idx, Name)); in LLVMBuildStructGEP()
3701 return wrap( in LLVMBuildStructGEP2()
3707 return wrap(unwrap(B)->CreateGlobalString(Str, Name)); in LLVMBuildGlobalString()
3712 return wrap(unwrap(B)->CreateGlobalStringPtr(Str, Name)); in LLVMBuildGlobalStringPtr()
3778 return wrap(unwrap(B)->CreateTrunc(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildTrunc()
3783 return wrap(unwrap(B)->CreateZExt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildZExt()
3788 return wrap(unwrap(B)->CreateSExt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildSExt()
3793 return wrap(unwrap(B)->CreateFPToUI(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPToUI()
3798 return wrap(unwrap(B)->CreateFPToSI(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPToSI()
3803 return wrap(unwrap(B)->CreateUIToFP(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildUIToFP()
3808 return wrap(unwrap(B)->CreateSIToFP(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildSIToFP()
3813 return wrap(unwrap(B)->CreateFPTrunc(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPTrunc()
3818 return wrap(unwrap(B)->CreateFPExt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPExt()
3823 return wrap(unwrap(B)->CreatePtrToInt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildPtrToInt()
3828 return wrap(unwrap(B)->CreateIntToPtr(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildIntToPtr()
3833 return wrap(unwrap(B)->CreateBitCast(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildBitCast()
3838 return wrap(unwrap(B)->CreateAddrSpaceCast(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildAddrSpaceCast()
3843 return wrap(unwrap(B)->CreateZExtOrBitCast(unwrap(Val), unwrap(DestTy), in LLVMBuildZExtOrBitCast()
3849 return wrap(unwrap(B)->CreateSExtOrBitCast(unwrap(Val), unwrap(DestTy), in LLVMBuildSExtOrBitCast()
3855 return wrap(unwrap(B)->CreateTruncOrBitCast(unwrap(Val), unwrap(DestTy), in LLVMBuildTruncOrBitCast()
3861 return wrap(unwrap(B)->CreateCast(Instruction::CastOps(map_from_llvmopcode(Op)), unwrap(Val), in LLVMBuildCast()
3867 return wrap(unwrap(B)->CreatePointerCast(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildPointerCast()
3873 return wrap( in LLVMBuildIntCast2()
3879 return wrap(unwrap(B)->CreateIntCast(unwrap(Val), unwrap(DestTy), in LLVMBuildIntCast()
3885 return wrap(unwrap(B)->CreateFPCast(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPCast()
3893 return wrap(unwrap(B)->CreateICmp(static_cast<ICmpInst::Predicate>(Op), in LLVMBuildICmp()
3900 return wrap(unwrap(B)->CreateFCmp(static_cast<FCmpInst::Predicate>(Op), in LLVMBuildFCmp()
3907 return wrap(unwrap(B)->CreatePHI(unwrap(Ty), 0, Name)); in LLVMBuildPhi()
3917 return wrap(unwrap(B)->CreateCall(FnT, unwrap(Fn), in LLVMBuildCall()
3925 return wrap(unwrap(B)->CreateCall(FTy, unwrap(Fn), in LLVMBuildCall2()
3932 return wrap(unwrap(B)->CreateSelect(unwrap(If), unwrap(Then), unwrap(Else), in LLVMBuildSelect()
3938 return wrap(unwrap(B)->CreateVAArg(unwrap(List), unwrap(Ty), Name)); in LLVMBuildVAArg()
3943 return wrap(unwrap(B)->CreateExtractElement(unwrap(VecVal), unwrap(Index), in LLVMBuildExtractElement()
3950 return wrap(unwrap(B)->CreateInsertElement(unwrap(VecVal), unwrap(EltVal), in LLVMBuildInsertElement()
3957 return wrap(unwrap(B)->CreateShuffleVector(unwrap(V1), unwrap(V2), in LLVMBuildShuffleVector()
3963 return wrap(unwrap(B)->CreateExtractValue(unwrap(AggVal), Index, Name)); in LLVMBuildExtractValue()
3969 return wrap(unwrap(B)->CreateInsertValue(unwrap(AggVal), unwrap(EltVal), in LLVMBuildInsertValue()
3975 return wrap(unwrap(B)->CreateFreeze(unwrap(Val), Name)); in LLVMBuildFreeze()
3980 return wrap(unwrap(B)->CreateIsNull(unwrap(Val), Name)); in LLVMBuildIsNull()
3985 return wrap(unwrap(B)->CreateIsNotNull(unwrap(Val), Name)); in LLVMBuildIsNotNull()
3990 return wrap(unwrap(B)->CreatePtrDiff(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildPtrDiff()
3998 return wrap(unwrap(B)->CreateAtomicRMW( in LLVMBuildAtomicRMW()
4010 return wrap(unwrap(B)->CreateAtomicCmpXchg( in LLVMBuildAtomicCmpXchg()
4099 *OutMemBuf = wrap(MBOrErr.get().release()); in LLVMCreateMemoryBufferWithContentsOfFile()
4110 *OutMemBuf = wrap(MBOrErr.get().release()); in LLVMCreateMemoryBufferWithSTDIN()
4120 return wrap(MemoryBuffer::getMemBuffer(StringRef(InputData, InputDataLength), in LLVMCreateMemoryBufferWithMemoryRange()
4130 return wrap( in LLVMCreateMemoryBufferWithMemoryRangeCopy()
4150 return wrap(PassRegistry::getPassRegistry()); in LLVMGetGlobalPassRegistry()
4156 return wrap(new legacy::PassManager()); in LLVMCreatePassManager()
4160 return wrap(new legacy::FunctionPassManager(unwrap(M))); in LLVMCreateFunctionPassManagerForModule()