Lines Matching refs:unwrap
56 initializeCore(*unwrap(R)); in LLVMInitializeCore()
87 unwrap(C)->setDiagnosticHandler( in LLVMContextSetDiagnosticHandler()
96 unwrap(C)->setYieldCallback(YieldCallback, OpaqueHandle); in LLVMContextSetYieldCallback()
100 delete unwrap(C); in LLVMContextDispose()
105 return unwrap(C)->getMDKindID(StringRef(Name, SLen)); in LLVMGetMDKindIDInContext()
117 unwrap(DI)->print(DP); in LLVMGetDiagInfoDescription()
126 switch(unwrap(DI)->getSeverity()) { in LLVMGetDiagInfoSeverity()
155 return wrap(new Module(ModuleID, *unwrap(C))); in LLVMModuleCreateWithNameInContext()
159 delete unwrap(M); in LLVMDisposeModule()
164 return unwrap(M)->getDataLayoutStr().c_str(); in LLVMGetDataLayout()
168 unwrap(M)->setDataLayout(Triple); in LLVMSetDataLayout()
173 return unwrap(M)->getTargetTriple().c_str(); in LLVMGetTarget()
177 unwrap(M)->setTargetTriple(Triple); in LLVMSetTarget()
181 unwrap(M)->dump(); in LLVMDumpModule()
193 unwrap(M)->print(dest, nullptr); in LLVMPrintModuleToFile()
209 unwrap(M)->print(os, nullptr); in LLVMPrintModuleToString()
217 unwrap(M)->setModuleInlineAsm(StringRef(Asm)); in LLVMSetModuleInlineAsm()
223 return wrap(&unwrap(M)->getContext()); in LLVMGetModuleContext()
232 switch (unwrap(Ty)->getTypeID()) { in LLVMGetTypeKind()
271 return unwrap(Ty)->isSized(); in LLVMTypeIsSized()
275 return wrap(&unwrap(Ty)->getContext()); in LLVMGetTypeContext()
279 return unwrap(Ty)->dump(); in LLVMDumpType()
286 if (unwrap(Ty)) in LLVMPrintTypeToString()
287 unwrap(Ty)->print(os); in LLVMPrintTypeToString()
299 return (LLVMTypeRef) Type::getInt1Ty(*unwrap(C)); in LLVMInt1TypeInContext()
302 return (LLVMTypeRef) Type::getInt8Ty(*unwrap(C)); in LLVMInt8TypeInContext()
305 return (LLVMTypeRef) Type::getInt16Ty(*unwrap(C)); in LLVMInt16TypeInContext()
308 return (LLVMTypeRef) Type::getInt32Ty(*unwrap(C)); in LLVMInt32TypeInContext()
311 return (LLVMTypeRef) Type::getInt64Ty(*unwrap(C)); in LLVMInt64TypeInContext()
314 return wrap(IntegerType::get(*unwrap(C), NumBits)); in LLVMIntTypeInContext()
337 return unwrap<IntegerType>(IntegerTy)->getBitWidth(); in LLVMGetIntTypeWidth()
343 return (LLVMTypeRef) Type::getHalfTy(*unwrap(C)); in LLVMHalfTypeInContext()
346 return (LLVMTypeRef) Type::getFloatTy(*unwrap(C)); in LLVMFloatTypeInContext()
349 return (LLVMTypeRef) Type::getDoubleTy(*unwrap(C)); in LLVMDoubleTypeInContext()
352 return (LLVMTypeRef) Type::getX86_FP80Ty(*unwrap(C)); in LLVMX86FP80TypeInContext()
355 return (LLVMTypeRef) Type::getFP128Ty(*unwrap(C)); in LLVMFP128TypeInContext()
358 return (LLVMTypeRef) Type::getPPC_FP128Ty(*unwrap(C)); in LLVMPPCFP128TypeInContext()
361 return (LLVMTypeRef) Type::getX86_MMXTy(*unwrap(C)); in LLVMX86MMXTypeInContext()
391 ArrayRef<Type*> Tys(unwrap(ParamTypes), ParamCount); in LLVMFunctionType()
392 return wrap(FunctionType::get(unwrap(ReturnType), Tys, IsVarArg != 0)); in LLVMFunctionType()
396 return unwrap<FunctionType>(FunctionTy)->isVarArg(); in LLVMIsFunctionVarArg()
400 return wrap(unwrap<FunctionType>(FunctionTy)->getReturnType()); in LLVMGetReturnType()
404 return unwrap<FunctionType>(FunctionTy)->getNumParams(); in LLVMCountParamTypes()
408 FunctionType *Ty = unwrap<FunctionType>(FunctionTy); in LLVMGetParamTypes()
418 ArrayRef<Type*> Tys(unwrap(ElementTypes), ElementCount); in LLVMStructTypeInContext()
419 return wrap(StructType::get(*unwrap(C), Tys, Packed != 0)); in LLVMStructTypeInContext()
430 return wrap(StructType::create(*unwrap(C), Name)); in LLVMStructCreateNamed()
435 StructType *Type = unwrap<StructType>(Ty); in LLVMGetStructName()
443 ArrayRef<Type*> Tys(unwrap(ElementTypes), ElementCount); in LLVMStructSetBody()
444 unwrap<StructType>(StructTy)->setBody(Tys, Packed != 0); in LLVMStructSetBody()
448 return unwrap<StructType>(StructTy)->getNumElements(); in LLVMCountStructElementTypes()
452 StructType *Ty = unwrap<StructType>(StructTy); in LLVMGetStructElementTypes()
459 return unwrap<StructType>(StructTy)->isPacked(); in LLVMIsPackedStruct()
463 return unwrap<StructType>(StructTy)->isOpaque(); in LLVMIsOpaqueStruct()
467 return wrap(unwrap(M)->getTypeByName(Name)); in LLVMGetTypeByName()
473 return wrap(ArrayType::get(unwrap(ElementType), ElementCount)); in LLVMArrayType()
477 return wrap(PointerType::get(unwrap(ElementType), AddressSpace)); in LLVMPointerType()
481 return wrap(VectorType::get(unwrap(ElementType), ElementCount)); in LLVMVectorType()
485 return wrap(unwrap<SequentialType>(Ty)->getElementType()); in LLVMGetElementType()
489 return unwrap<ArrayType>(ArrayTy)->getNumElements(); in LLVMGetArrayLength()
493 return unwrap<PointerType>(PointerTy)->getAddressSpace(); in LLVMGetPointerAddressSpace()
497 return unwrap<VectorType>(VectorTy)->getNumElements(); in LLVMGetVectorSize()
503 return wrap(Type::getVoidTy(*unwrap(C))); in LLVMVoidTypeInContext()
506 return wrap(Type::getLabelTy(*unwrap(C))); in LLVMLabelTypeInContext()
521 return wrap(unwrap(Val)->getType()); in LLVMTypeOf()
525 return unwrap(Val)->getName().data(); in LLVMGetValueName()
529 unwrap(Val)->setName(Name); in LLVMSetValueName()
533 unwrap(Val)->dump(); in LLVMDumpValue()
540 if (unwrap(Val)) in LLVMPrintValueToString()
541 unwrap(Val)->print(os); in LLVMPrintValueToString()
551 unwrap(OldVal)->replaceAllUsesWith(unwrap(NewVal)); in LLVMReplaceAllUsesWith()
555 return unwrap<Instruction>(Inst)->hasMetadata(); in LLVMHasMetadata()
559 auto *I = unwrap<Instruction>(Inst); in LLVMGetMetadata()
581 MDNode *N = Val ? extractMDNode(unwrap<MetadataAsValue>(Val)) : nullptr; in LLVMSetMetadata()
583 unwrap<Instruction>(Inst)->setMetadata(KindID, N); in LLVMSetMetadata()
590 return wrap(static_cast<Value*>(dyn_cast_or_null<name>(unwrap(Val)))); \
596 if (auto *MD = dyn_cast_or_null<MetadataAsValue>(unwrap(Val))) in LLVM_FOR_EACH_VALUE_SUBCLASS()
604 if (auto *MD = dyn_cast_or_null<MetadataAsValue>(unwrap(Val))) in LLVMIsAMDString()
612 Value *V = unwrap(Val); in LLVMGetFirstUse()
620 Use *Next = unwrap(U)->getNext(); in LLVMGetNextUse()
627 return wrap(unwrap(U)->getUser()); in LLVMGetUser()
631 return wrap(unwrap(U)->get()); in LLVMGetUsedValue()
647 Value *V = unwrap(Val); in LLVMGetOperand()
661 Value *V = unwrap(Val); in LLVMGetOperandUse()
666 unwrap<User>(Val)->setOperand(Index, unwrap(Op)); in LLVMSetOperand()
670 Value *V = unwrap(Val); in LLVMGetNumOperands()
680 return wrap(Constant::getNullValue(unwrap(Ty))); in LLVMConstNull()
684 return wrap(Constant::getAllOnesValue(unwrap(Ty))); in LLVMConstAllOnes()
688 return wrap(UndefValue::get(unwrap(Ty))); in LLVMGetUndef()
692 return isa<Constant>(unwrap(Ty)); in LLVMIsConstant()
696 if (Constant *C = dyn_cast<Constant>(unwrap(Val))) in LLVMIsNull()
702 return isa<UndefValue>(unwrap(Val)); in LLVMIsUndef()
707 wrap(ConstantPointerNull::get(unwrap<PointerType>(Ty))); in LLVMConstPointerNull()
714 LLVMContext &Context = *unwrap(C); in LLVMMDStringInContext()
725 LLVMContext &Context = *unwrap(C); in LLVMMDNodeInContext()
728 Value *V = unwrap(OV); in LLVMMDNodeInContext()
755 if (const auto *MD = dyn_cast<MetadataAsValue>(unwrap(V))) in LLVMGetMDString()
766 auto *MD = cast<MetadataAsValue>(unwrap(V)); in LLVMGetMDNodeNumOperands()
774 auto *MD = cast<MetadataAsValue>(unwrap(V)); in LLVMGetMDNodeOperands()
781 LLVMContext &Context = unwrap(V)->getContext(); in LLVMGetMDNodeOperands()
788 if (NamedMDNode *N = unwrap(M)->getNamedMetadata(name)) { in LLVMGetNamedMetadataNumOperands()
796 NamedMDNode *N = unwrap(M)->getNamedMetadata(name); in LLVMGetNamedMetadataOperands()
799 LLVMContext &Context = unwrap(M)->getContext(); in LLVMGetNamedMetadataOperands()
807 NamedMDNode *N = unwrap(M)->getOrInsertNamedMetadata(name); in LLVMAddNamedMetadataOperand()
812 N->addOperand(extractMDNode(unwrap<MetadataAsValue>(Val))); in LLVMAddNamedMetadataOperand()
819 return wrap(ConstantInt::get(unwrap<IntegerType>(IntTy), N, SignExtend != 0)); in LLVMConstInt()
825 IntegerType *Ty = unwrap<IntegerType>(IntTy); in LLVMConstIntOfArbitraryPrecision()
833 return wrap(ConstantInt::get(unwrap<IntegerType>(IntTy), StringRef(Str), in LLVMConstIntOfString()
839 return wrap(ConstantInt::get(unwrap<IntegerType>(IntTy), StringRef(Str, SLen), in LLVMConstIntOfStringAndSize()
844 return wrap(ConstantFP::get(unwrap(RealTy), N)); in LLVMConstReal()
848 return wrap(ConstantFP::get(unwrap(RealTy), StringRef(Text))); in LLVMConstRealOfString()
853 return wrap(ConstantFP::get(unwrap(RealTy), StringRef(Str, SLen))); in LLVMConstRealOfStringAndSize()
857 return unwrap<ConstantInt>(ConstantVal)->getZExtValue(); in LLVMConstIntGetZExtValue()
861 return unwrap<ConstantInt>(ConstantVal)->getSExtValue(); in LLVMConstIntGetSExtValue()
865 ConstantFP *cFP = unwrap<ConstantFP>(ConstantVal) ; in LLVMConstRealGetDouble()
892 return wrap(ConstantDataArray::getString(*unwrap(C), StringRef(Str, Length), in LLVMConstStringInContext()
898 Constant **Elements = unwrap<Constant>(ConstantVals, Count); in LLVMConstStructInContext()
899 return wrap(ConstantStruct::getAnon(*unwrap(C), makeArrayRef(Elements, Count), in LLVMConstStructInContext()
910 return wrap(static_cast<ConstantDataSequential*>(unwrap(c))->getElementAsConstant(idx)); in LLVMGetElementAsConstant()
914 return static_cast<ConstantDataSequential*>(unwrap(c))->isString(); in LLVMIsConstantString()
918 StringRef str = static_cast<ConstantDataSequential*>(unwrap(c))->getAsString(); in LLVMGetAsString()
925 ArrayRef<Constant*> V(unwrap<Constant>(ConstantVals, Length), Length); in LLVMConstArray()
926 return wrap(ConstantArray::get(ArrayType::get(unwrap(ElementTy), Length), V)); in LLVMConstArray()
938 Constant **Elements = unwrap<Constant>(ConstantVals, Count); in LLVMConstNamedStruct()
939 StructType *Ty = cast<StructType>(unwrap(StructTy)); in LLVMConstNamedStruct()
946 unwrap<Constant>(ScalarConstantVals, Size), Size))); in LLVMConstVector()
974 return map_to_llvmopcode(unwrap<ConstantExpr>(ConstantVal)->getOpcode()); in LLVMGetConstOpcode()
978 return wrap(ConstantExpr::getAlignOf(unwrap(Ty))); in LLVMAlignOf()
982 return wrap(ConstantExpr::getSizeOf(unwrap(Ty))); in LLVMSizeOf()
986 return wrap(ConstantExpr::getNeg(unwrap<Constant>(ConstantVal))); in LLVMConstNeg()
990 return wrap(ConstantExpr::getNSWNeg(unwrap<Constant>(ConstantVal))); in LLVMConstNSWNeg()
994 return wrap(ConstantExpr::getNUWNeg(unwrap<Constant>(ConstantVal))); in LLVMConstNUWNeg()
999 return wrap(ConstantExpr::getFNeg(unwrap<Constant>(ConstantVal))); in LLVMConstFNeg()
1003 return wrap(ConstantExpr::getNot(unwrap<Constant>(ConstantVal))); in LLVMConstNot()
1007 return wrap(ConstantExpr::getAdd(unwrap<Constant>(LHSConstant), in LLVMConstAdd()
1008 unwrap<Constant>(RHSConstant))); in LLVMConstAdd()
1013 return wrap(ConstantExpr::getNSWAdd(unwrap<Constant>(LHSConstant), in LLVMConstNSWAdd()
1014 unwrap<Constant>(RHSConstant))); in LLVMConstNSWAdd()
1019 return wrap(ConstantExpr::getNUWAdd(unwrap<Constant>(LHSConstant), in LLVMConstNUWAdd()
1020 unwrap<Constant>(RHSConstant))); in LLVMConstNUWAdd()
1024 return wrap(ConstantExpr::getFAdd(unwrap<Constant>(LHSConstant), in LLVMConstFAdd()
1025 unwrap<Constant>(RHSConstant))); in LLVMConstFAdd()
1029 return wrap(ConstantExpr::getSub(unwrap<Constant>(LHSConstant), in LLVMConstSub()
1030 unwrap<Constant>(RHSConstant))); in LLVMConstSub()
1035 return wrap(ConstantExpr::getNSWSub(unwrap<Constant>(LHSConstant), in LLVMConstNSWSub()
1036 unwrap<Constant>(RHSConstant))); in LLVMConstNSWSub()
1041 return wrap(ConstantExpr::getNUWSub(unwrap<Constant>(LHSConstant), in LLVMConstNUWSub()
1042 unwrap<Constant>(RHSConstant))); in LLVMConstNUWSub()
1046 return wrap(ConstantExpr::getFSub(unwrap<Constant>(LHSConstant), in LLVMConstFSub()
1047 unwrap<Constant>(RHSConstant))); in LLVMConstFSub()
1051 return wrap(ConstantExpr::getMul(unwrap<Constant>(LHSConstant), in LLVMConstMul()
1052 unwrap<Constant>(RHSConstant))); in LLVMConstMul()
1057 return wrap(ConstantExpr::getNSWMul(unwrap<Constant>(LHSConstant), in LLVMConstNSWMul()
1058 unwrap<Constant>(RHSConstant))); in LLVMConstNSWMul()
1063 return wrap(ConstantExpr::getNUWMul(unwrap<Constant>(LHSConstant), in LLVMConstNUWMul()
1064 unwrap<Constant>(RHSConstant))); in LLVMConstNUWMul()
1068 return wrap(ConstantExpr::getFMul(unwrap<Constant>(LHSConstant), in LLVMConstFMul()
1069 unwrap<Constant>(RHSConstant))); in LLVMConstFMul()
1073 return wrap(ConstantExpr::getUDiv(unwrap<Constant>(LHSConstant), in LLVMConstUDiv()
1074 unwrap<Constant>(RHSConstant))); in LLVMConstUDiv()
1078 return wrap(ConstantExpr::getSDiv(unwrap<Constant>(LHSConstant), in LLVMConstSDiv()
1079 unwrap<Constant>(RHSConstant))); in LLVMConstSDiv()
1084 return wrap(ConstantExpr::getExactSDiv(unwrap<Constant>(LHSConstant), in LLVMConstExactSDiv()
1085 unwrap<Constant>(RHSConstant))); in LLVMConstExactSDiv()
1089 return wrap(ConstantExpr::getFDiv(unwrap<Constant>(LHSConstant), in LLVMConstFDiv()
1090 unwrap<Constant>(RHSConstant))); in LLVMConstFDiv()
1094 return wrap(ConstantExpr::getURem(unwrap<Constant>(LHSConstant), in LLVMConstURem()
1095 unwrap<Constant>(RHSConstant))); in LLVMConstURem()
1099 return wrap(ConstantExpr::getSRem(unwrap<Constant>(LHSConstant), in LLVMConstSRem()
1100 unwrap<Constant>(RHSConstant))); in LLVMConstSRem()
1104 return wrap(ConstantExpr::getFRem(unwrap<Constant>(LHSConstant), in LLVMConstFRem()
1105 unwrap<Constant>(RHSConstant))); in LLVMConstFRem()
1109 return wrap(ConstantExpr::getAnd(unwrap<Constant>(LHSConstant), in LLVMConstAnd()
1110 unwrap<Constant>(RHSConstant))); in LLVMConstAnd()
1114 return wrap(ConstantExpr::getOr(unwrap<Constant>(LHSConstant), in LLVMConstOr()
1115 unwrap<Constant>(RHSConstant))); in LLVMConstOr()
1119 return wrap(ConstantExpr::getXor(unwrap<Constant>(LHSConstant), in LLVMConstXor()
1120 unwrap<Constant>(RHSConstant))); in LLVMConstXor()
1126 unwrap<Constant>(LHSConstant), in LLVMConstICmp()
1127 unwrap<Constant>(RHSConstant))); in LLVMConstICmp()
1133 unwrap<Constant>(LHSConstant), in LLVMConstFCmp()
1134 unwrap<Constant>(RHSConstant))); in LLVMConstFCmp()
1138 return wrap(ConstantExpr::getShl(unwrap<Constant>(LHSConstant), in LLVMConstShl()
1139 unwrap<Constant>(RHSConstant))); in LLVMConstShl()
1143 return wrap(ConstantExpr::getLShr(unwrap<Constant>(LHSConstant), in LLVMConstLShr()
1144 unwrap<Constant>(RHSConstant))); in LLVMConstLShr()
1148 return wrap(ConstantExpr::getAShr(unwrap<Constant>(LHSConstant), in LLVMConstAShr()
1149 unwrap<Constant>(RHSConstant))); in LLVMConstAShr()
1154 ArrayRef<Constant *> IdxList(unwrap<Constant>(ConstantIndices, NumIndices), in LLVMConstGEP()
1157 nullptr, unwrap<Constant>(ConstantVal), IdxList)); in LLVMConstGEP()
1163 Constant* Val = unwrap<Constant>(ConstantVal); in LLVMConstInBoundsGEP()
1164 ArrayRef<Constant *> IdxList(unwrap<Constant>(ConstantIndices, NumIndices), in LLVMConstInBoundsGEP()
1170 return wrap(ConstantExpr::getTrunc(unwrap<Constant>(ConstantVal), in LLVMConstTrunc()
1171 unwrap(ToType))); in LLVMConstTrunc()
1175 return wrap(ConstantExpr::getSExt(unwrap<Constant>(ConstantVal), in LLVMConstSExt()
1176 unwrap(ToType))); in LLVMConstSExt()
1180 return wrap(ConstantExpr::getZExt(unwrap<Constant>(ConstantVal), in LLVMConstZExt()
1181 unwrap(ToType))); in LLVMConstZExt()
1185 return wrap(ConstantExpr::getFPTrunc(unwrap<Constant>(ConstantVal), in LLVMConstFPTrunc()
1186 unwrap(ToType))); in LLVMConstFPTrunc()
1190 return wrap(ConstantExpr::getFPExtend(unwrap<Constant>(ConstantVal), in LLVMConstFPExt()
1191 unwrap(ToType))); in LLVMConstFPExt()
1195 return wrap(ConstantExpr::getUIToFP(unwrap<Constant>(ConstantVal), in LLVMConstUIToFP()
1196 unwrap(ToType))); in LLVMConstUIToFP()
1200 return wrap(ConstantExpr::getSIToFP(unwrap<Constant>(ConstantVal), in LLVMConstSIToFP()
1201 unwrap(ToType))); in LLVMConstSIToFP()
1205 return wrap(ConstantExpr::getFPToUI(unwrap<Constant>(ConstantVal), in LLVMConstFPToUI()
1206 unwrap(ToType))); in LLVMConstFPToUI()
1210 return wrap(ConstantExpr::getFPToSI(unwrap<Constant>(ConstantVal), in LLVMConstFPToSI()
1211 unwrap(ToType))); in LLVMConstFPToSI()
1215 return wrap(ConstantExpr::getPtrToInt(unwrap<Constant>(ConstantVal), in LLVMConstPtrToInt()
1216 unwrap(ToType))); in LLVMConstPtrToInt()
1220 return wrap(ConstantExpr::getIntToPtr(unwrap<Constant>(ConstantVal), in LLVMConstIntToPtr()
1221 unwrap(ToType))); in LLVMConstIntToPtr()
1225 return wrap(ConstantExpr::getBitCast(unwrap<Constant>(ConstantVal), in LLVMConstBitCast()
1226 unwrap(ToType))); in LLVMConstBitCast()
1231 return wrap(ConstantExpr::getAddrSpaceCast(unwrap<Constant>(ConstantVal), in LLVMConstAddrSpaceCast()
1232 unwrap(ToType))); in LLVMConstAddrSpaceCast()
1237 return wrap(ConstantExpr::getZExtOrBitCast(unwrap<Constant>(ConstantVal), in LLVMConstZExtOrBitCast()
1238 unwrap(ToType))); in LLVMConstZExtOrBitCast()
1243 return wrap(ConstantExpr::getSExtOrBitCast(unwrap<Constant>(ConstantVal), in LLVMConstSExtOrBitCast()
1244 unwrap(ToType))); in LLVMConstSExtOrBitCast()
1249 return wrap(ConstantExpr::getTruncOrBitCast(unwrap<Constant>(ConstantVal), in LLVMConstTruncOrBitCast()
1250 unwrap(ToType))); in LLVMConstTruncOrBitCast()
1255 return wrap(ConstantExpr::getPointerCast(unwrap<Constant>(ConstantVal), in LLVMConstPointerCast()
1256 unwrap(ToType))); in LLVMConstPointerCast()
1261 return wrap(ConstantExpr::getIntegerCast(unwrap<Constant>(ConstantVal), in LLVMConstIntCast()
1262 unwrap(ToType), isSigned)); in LLVMConstIntCast()
1266 return wrap(ConstantExpr::getFPCast(unwrap<Constant>(ConstantVal), in LLVMConstFPCast()
1267 unwrap(ToType))); in LLVMConstFPCast()
1273 return wrap(ConstantExpr::getSelect(unwrap<Constant>(ConstantCondition), in LLVMConstSelect()
1274 unwrap<Constant>(ConstantIfTrue), in LLVMConstSelect()
1275 unwrap<Constant>(ConstantIfFalse))); in LLVMConstSelect()
1280 return wrap(ConstantExpr::getExtractElement(unwrap<Constant>(VectorConstant), in LLVMConstExtractElement()
1281 unwrap<Constant>(IndexConstant))); in LLVMConstExtractElement()
1287 return wrap(ConstantExpr::getInsertElement(unwrap<Constant>(VectorConstant), in LLVMConstInsertElement()
1288 unwrap<Constant>(ElementValueConstant), in LLVMConstInsertElement()
1289 unwrap<Constant>(IndexConstant))); in LLVMConstInsertElement()
1295 return wrap(ConstantExpr::getShuffleVector(unwrap<Constant>(VectorAConstant), in LLVMConstShuffleVector()
1296 unwrap<Constant>(VectorBConstant), in LLVMConstShuffleVector()
1297 unwrap<Constant>(MaskConstant))); in LLVMConstShuffleVector()
1302 return wrap(ConstantExpr::getExtractValue(unwrap<Constant>(AggConstant), in LLVMConstExtractValue()
1309 return wrap(ConstantExpr::getInsertValue(unwrap<Constant>(AggConstant), in LLVMConstInsertValue()
1310 unwrap<Constant>(ElementValueConstant), in LLVMConstInsertValue()
1318 return wrap(InlineAsm::get(dyn_cast<FunctionType>(unwrap(Ty)), AsmString, in LLVMConstInlineAsm()
1323 return wrap(BlockAddress::get(unwrap<Function>(F), unwrap(BB))); in LLVMBlockAddress()
1329 return wrap(unwrap<GlobalValue>(Global)->getParent()); in LLVMGetGlobalParent()
1333 return unwrap<GlobalValue>(Global)->isDeclaration(); in LLVMIsDeclaration()
1337 switch (unwrap<GlobalValue>(Global)->getLinkage()) { in LLVMGetLinkage()
1366 GlobalValue *GV = unwrap<GlobalValue>(Global); in LLVMSetLinkage()
1428 return unwrap<GlobalValue>(Global)->getSection(); in LLVMGetSection()
1432 unwrap<GlobalObject>(Global)->setSection(Section); in LLVMSetSection()
1437 unwrap<GlobalValue>(Global)->getVisibility()); in LLVMGetVisibility()
1441 unwrap<GlobalValue>(Global) in LLVMSetVisibility()
1447 unwrap<GlobalValue>(Global)->getDLLStorageClass()); in LLVMGetDLLStorageClass()
1451 unwrap<GlobalValue>(Global)->setDLLStorageClass( in LLVMSetDLLStorageClass()
1456 return unwrap<GlobalValue>(Global)->hasUnnamedAddr(); in LLVMHasUnnamedAddr()
1460 unwrap<GlobalValue>(Global)->setUnnamedAddr(HasUnnamedAddr); in LLVMSetUnnamedAddr()
1466 Value *P = unwrap<Value>(V); in LLVMGetAlignment()
1481 Value *P = unwrap<Value>(V); in LLVMSetAlignment()
1498 return wrap(new GlobalVariable(*unwrap(M), unwrap(Ty), false, in LLVMAddGlobal()
1505 return wrap(new GlobalVariable(*unwrap(M), unwrap(Ty), false, in LLVMAddGlobalInAddressSpace()
1512 return wrap(unwrap(M)->getNamedGlobal(Name)); in LLVMGetNamedGlobal()
1516 Module *Mod = unwrap(M); in LLVMGetFirstGlobal()
1524 Module *Mod = unwrap(M); in LLVMGetLastGlobal()
1532 GlobalVariable *GV = unwrap<GlobalVariable>(GlobalVar); in LLVMGetNextGlobal()
1540 GlobalVariable *GV = unwrap<GlobalVariable>(GlobalVar); in LLVMGetPreviousGlobal()
1548 unwrap<GlobalVariable>(GlobalVar)->eraseFromParent(); in LLVMDeleteGlobal()
1552 GlobalVariable* GV = unwrap<GlobalVariable>(GlobalVar); in LLVMGetInitializer()
1559 unwrap<GlobalVariable>(GlobalVar) in LLVMSetInitializer()
1560 ->setInitializer(unwrap<Constant>(ConstantVal)); in LLVMSetInitializer()
1564 return unwrap<GlobalVariable>(GlobalVar)->isThreadLocal(); in LLVMIsThreadLocal()
1568 unwrap<GlobalVariable>(GlobalVar)->setThreadLocal(IsThreadLocal != 0); in LLVMSetThreadLocal()
1572 return unwrap<GlobalVariable>(GlobalVar)->isConstant(); in LLVMIsGlobalConstant()
1576 unwrap<GlobalVariable>(GlobalVar)->setConstant(IsConstant != 0); in LLVMSetGlobalConstant()
1580 switch (unwrap<GlobalVariable>(GlobalVar)->getThreadLocalMode()) { in LLVMGetThreadLocalMode()
1597 GlobalVariable *GV = unwrap<GlobalVariable>(GlobalVar); in LLVMSetThreadLocalMode()
1619 return unwrap<GlobalVariable>(GlobalVar)->isExternallyInitialized(); in LLVMIsExternallyInitialized()
1623 unwrap<GlobalVariable>(GlobalVar)->setExternallyInitialized(IsExtInit); in LLVMSetExternallyInitialized()
1630 auto *PTy = cast<PointerType>(unwrap(Ty)); in LLVMAddAlias()
1633 unwrap<Constant>(Aliasee), unwrap(M))); in LLVMAddAlias()
1640 return wrap(Function::Create(unwrap<FunctionType>(FunctionTy), in LLVMAddFunction()
1641 GlobalValue::ExternalLinkage, Name, unwrap(M))); in LLVMAddFunction()
1645 return wrap(unwrap(M)->getFunction(Name)); in LLVMGetNamedFunction()
1649 Module *Mod = unwrap(M); in LLVMGetFirstFunction()
1657 Module *Mod = unwrap(M); in LLVMGetLastFunction()
1665 Function *Func = unwrap<Function>(Fn); in LLVMGetNextFunction()
1673 Function *Func = unwrap<Function>(Fn); in LLVMGetPreviousFunction()
1681 unwrap<Function>(Fn)->eraseFromParent(); in LLVMDeleteFunction()
1685 if (Function *F = dyn_cast<Function>(unwrap(Fn))) in LLVMGetIntrinsicID()
1691 return unwrap<Function>(Fn)->getCallingConv(); in LLVMGetFunctionCallConv()
1695 return unwrap<Function>(Fn)->setCallingConv( in LLVMSetFunctionCallConv()
1700 Function *F = unwrap<Function>(Fn); in LLVMGetGC()
1705 Function *F = unwrap<Function>(Fn); in LLVMSetGC()
1713 Function *Func = unwrap<Function>(Fn); in LLVMAddFunctionAttr()
1725 Function *Func = unwrap<Function>(Fn); in LLVMAddTargetDependentFunctionAttr()
1736 Function *Func = unwrap<Function>(Fn); in LLVMRemoveFunctionAttr()
1747 Function *Func = unwrap<Function>(Fn); in LLVMGetFunctionAttr()
1757 return unwrap<Function>(FnRef)->arg_size(); in LLVMCountParams()
1761 Function *Fn = unwrap<Function>(FnRef); in LLVMGetParams()
1768 Function::arg_iterator AI = unwrap<Function>(FnRef)->arg_begin(); in LLVMGetParam()
1775 return wrap(unwrap<Argument>(V)->getParent()); in LLVMGetParamParent()
1779 Function *Func = unwrap<Function>(Fn); in LLVMGetFirstParam()
1787 Function *Func = unwrap<Function>(Fn); in LLVMGetLastParam()
1795 Argument *A = unwrap<Argument>(Arg); in LLVMGetNextParam()
1803 Argument *A = unwrap<Argument>(Arg); in LLVMGetPreviousParam()
1811 Argument *A = unwrap<Argument>(Arg); in LLVMAddAttribute()
1817 Argument *A = unwrap<Argument>(Arg); in LLVMRemoveAttribute()
1823 Argument *A = unwrap<Argument>(Arg); in LLVMGetAttribute()
1830 Argument *A = unwrap<Argument>(Arg); in LLVMSetParamAlignment()
1839 return wrap(static_cast<Value*>(unwrap(BB))); in LLVMBasicBlockAsValue()
1843 return isa<BasicBlock>(unwrap(Val)); in LLVMValueIsBasicBlock()
1847 return wrap(unwrap<BasicBlock>(Val)); in LLVMValueAsBasicBlock()
1851 return wrap(unwrap(BB)->getParent()); in LLVMGetBasicBlockParent()
1855 return wrap(unwrap(BB)->getTerminator()); in LLVMGetBasicBlockTerminator()
1859 return unwrap<Function>(FnRef)->size(); in LLVMCountBasicBlocks()
1863 Function *Fn = unwrap<Function>(FnRef); in LLVMGetBasicBlocks()
1869 return wrap(&unwrap<Function>(Fn)->getEntryBlock()); in LLVMGetEntryBasicBlock()
1873 Function *Func = unwrap<Function>(Fn); in LLVMGetFirstBasicBlock()
1881 Function *Func = unwrap<Function>(Fn); in LLVMGetLastBasicBlock()
1889 BasicBlock *Block = unwrap(BB); in LLVMGetNextBasicBlock()
1897 BasicBlock *Block = unwrap(BB); in LLVMGetPreviousBasicBlock()
1907 return wrap(BasicBlock::Create(*unwrap(C), Name, unwrap<Function>(FnRef))); in LLVMAppendBasicBlockInContext()
1917 BasicBlock *BB = unwrap(BBRef); in LLVMInsertBasicBlockInContext()
1918 return wrap(BasicBlock::Create(*unwrap(C), Name, BB->getParent(), BB)); in LLVMInsertBasicBlockInContext()
1927 unwrap(BBRef)->eraseFromParent(); in LLVMDeleteBasicBlock()
1931 unwrap(BBRef)->removeFromParent(); in LLVMRemoveBasicBlockFromParent()
1935 unwrap(BB)->moveBefore(unwrap(MovePos)); in LLVMMoveBasicBlockBefore()
1939 unwrap(BB)->moveAfter(unwrap(MovePos)); in LLVMMoveBasicBlockAfter()
1945 return wrap(unwrap<Instruction>(Inst)->getParent()); in LLVMGetInstructionParent()
1949 BasicBlock *Block = unwrap(BB); in LLVMGetFirstInstruction()
1957 BasicBlock *Block = unwrap(BB); in LLVMGetLastInstruction()
1965 Instruction *Instr = unwrap<Instruction>(Inst); in LLVMGetNextInstruction()
1973 Instruction *Instr = unwrap<Instruction>(Inst); in LLVMGetPreviousInstruction()
1981 unwrap<Instruction>(Inst)->eraseFromParent(); in LLVMInstructionEraseFromParent()
1985 if (ICmpInst *I = dyn_cast<ICmpInst>(unwrap(Inst))) in LLVMGetICmpPredicate()
1987 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(unwrap(Inst))) in LLVMGetICmpPredicate()
1994 if (FCmpInst *I = dyn_cast<FCmpInst>(unwrap(Inst))) in LLVMGetFCmpPredicate()
1996 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(unwrap(Inst))) in LLVMGetFCmpPredicate()
2003 if (Instruction *C = dyn_cast<Instruction>(unwrap(Inst))) in LLVMGetInstructionOpcode()
2009 if (Instruction *C = dyn_cast<Instruction>(unwrap(Inst))) in LLVMInstructionClone()
2017 Value *V = unwrap(Instr); in LLVMGetInstructionCallConv()
2026 Value *V = unwrap(Instr); in LLVMSetInstructionCallConv()
2036 CallSite Call = CallSite(unwrap<Instruction>(Instr)); in LLVMAddInstrAttribute()
2046 CallSite Call = CallSite(unwrap<Instruction>(Instr)); in LLVMRemoveInstrAttribute()
2056 CallSite Call = CallSite(unwrap<Instruction>(Instr)); in LLVMSetInstrParamAlignment()
2068 return unwrap<CallInst>(Call)->isTailCall(); in LLVMIsTailCall()
2072 unwrap<CallInst>(Call)->setTailCall(isTailCall); in LLVMSetTailCall()
2078 return unwrap<TerminatorInst>(Term)->getNumSuccessors(); in LLVMGetNumSuccessors()
2082 return wrap(unwrap<TerminatorInst>(Term)->getSuccessor(i)); in LLVMGetSuccessor()
2086 return unwrap<TerminatorInst>(Term)->setSuccessor(i,unwrap(block)); in LLVMSetSuccessor()
2092 return unwrap<BranchInst>(Branch)->isConditional(); in LLVMIsConditional()
2096 return wrap(unwrap<BranchInst>(Branch)->getCondition()); in LLVMGetCondition()
2100 return unwrap<BranchInst>(Branch)->setCondition(unwrap(Cond)); in LLVMSetCondition()
2106 return wrap(unwrap<SwitchInst>(Switch)->getDefaultDest()); in LLVMGetSwitchDefaultDest()
2113 PHINode *PhiVal = unwrap<PHINode>(PhiNode); in LLVMAddIncoming()
2115 PhiVal->addIncoming(unwrap(IncomingValues[I]), unwrap(IncomingBlocks[I])); in LLVMAddIncoming()
2119 return unwrap<PHINode>(PhiNode)->getNumIncomingValues(); in LLVMCountIncoming()
2123 return wrap(unwrap<PHINode>(PhiNode)->getIncomingValue(Index)); in LLVMGetIncomingValue()
2127 return wrap(unwrap<PHINode>(PhiNode)->getIncomingBlock(Index)); in LLVMGetIncomingBlock()
2134 return wrap(new IRBuilder<>(*unwrap(C))); in LLVMCreateBuilderInContext()
2143 BasicBlock *BB = unwrap(Block); in LLVMPositionBuilder()
2144 Instruction *I = Instr? unwrap<Instruction>(Instr) : (Instruction*) BB->end(); in LLVMPositionBuilder()
2145 unwrap(Builder)->SetInsertPoint(BB, I); in LLVMPositionBuilder()
2149 Instruction *I = unwrap<Instruction>(Instr); in LLVMPositionBuilderBefore()
2150 unwrap(Builder)->SetInsertPoint(I->getParent(), I); in LLVMPositionBuilderBefore()
2154 BasicBlock *BB = unwrap(Block); in LLVMPositionBuilderAtEnd()
2155 unwrap(Builder)->SetInsertPoint(BB); in LLVMPositionBuilderAtEnd()
2159 return wrap(unwrap(Builder)->GetInsertBlock()); in LLVMGetInsertBlock()
2163 unwrap(Builder)->ClearInsertionPoint(); in LLVMClearInsertionPosition()
2167 unwrap(Builder)->Insert(unwrap<Instruction>(Instr)); in LLVMInsertIntoBuilder()
2172 unwrap(Builder)->Insert(unwrap<Instruction>(Instr), Name); in LLVMInsertIntoBuilderWithName()
2176 delete unwrap(Builder); in LLVMDisposeBuilder()
2183 L ? cast<MDNode>(unwrap<MetadataAsValue>(L)->getMetadata()) : nullptr; in LLVMSetCurrentDebugLocation()
2184 unwrap(Builder)->SetCurrentDebugLocation(DebugLoc(Loc)); in LLVMSetCurrentDebugLocation()
2188 LLVMContext &Context = unwrap(Builder)->getContext(); in LLVMGetCurrentDebugLocation()
2190 Context, unwrap(Builder)->getCurrentDebugLocation().getAsMDNode())); in LLVMGetCurrentDebugLocation()
2194 unwrap(Builder)->SetInstDebugLocation(unwrap<Instruction>(Inst)); in LLVMSetInstDebugLocation()
2201 return wrap(unwrap(B)->CreateRetVoid()); in LLVMBuildRetVoid()
2205 return wrap(unwrap(B)->CreateRet(unwrap(V))); in LLVMBuildRet()
2210 return wrap(unwrap(B)->CreateAggregateRet(unwrap(RetVals), N)); in LLVMBuildAggregateRet()
2214 return wrap(unwrap(B)->CreateBr(unwrap(Dest))); in LLVMBuildBr()
2219 return wrap(unwrap(B)->CreateCondBr(unwrap(If), unwrap(Then), unwrap(Else))); in LLVMBuildCondBr()
2224 return wrap(unwrap(B)->CreateSwitch(unwrap(V), unwrap(Else), NumCases)); in LLVMBuildSwitch()
2229 return wrap(unwrap(B)->CreateIndirectBr(unwrap(Addr), NumDests)); in LLVMBuildIndirectBr()
2236 return wrap(unwrap(B)->CreateInvoke(unwrap(Fn), unwrap(Then), unwrap(Catch), in LLVMBuildInvoke()
2237 makeArrayRef(unwrap(Args), NumArgs), in LLVMBuildInvoke()
2244 return wrap(unwrap(B)->CreateLandingPad(unwrap(Ty), in LLVMBuildLandingPad()
2245 cast<Function>(unwrap(PersFn)), in LLVMBuildLandingPad()
2250 return wrap(unwrap(B)->CreateResume(unwrap(Exn))); in LLVMBuildResume()
2254 return wrap(unwrap(B)->CreateUnreachable()); in LLVMBuildUnreachable()
2259 unwrap<SwitchInst>(Switch)->addCase(unwrap<ConstantInt>(OnVal), unwrap(Dest)); in LLVMAddCase()
2263 unwrap<IndirectBrInst>(IndirectBr)->addDestination(unwrap(Dest)); in LLVMAddDestination()
2267 unwrap<LandingPadInst>(LandingPad)-> in LLVMAddClause()
2268 addClause(cast<Constant>(unwrap(ClauseVal))); in LLVMAddClause()
2272 unwrap<LandingPadInst>(LandingPad)->setCleanup(Val); in LLVMSetCleanup()
2279 return wrap(unwrap(B)->CreateAdd(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildAdd()
2284 return wrap(unwrap(B)->CreateNSWAdd(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildNSWAdd()
2289 return wrap(unwrap(B)->CreateNUWAdd(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildNUWAdd()
2294 return wrap(unwrap(B)->CreateFAdd(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildFAdd()
2299 return wrap(unwrap(B)->CreateSub(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildSub()
2304 return wrap(unwrap(B)->CreateNSWSub(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildNSWSub()
2309 return wrap(unwrap(B)->CreateNUWSub(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildNUWSub()
2314 return wrap(unwrap(B)->CreateFSub(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildFSub()
2319 return wrap(unwrap(B)->CreateMul(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildMul()
2324 return wrap(unwrap(B)->CreateNSWMul(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildNSWMul()
2329 return wrap(unwrap(B)->CreateNUWMul(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildNUWMul()
2334 return wrap(unwrap(B)->CreateFMul(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildFMul()
2339 return wrap(unwrap(B)->CreateUDiv(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildUDiv()
2344 return wrap(unwrap(B)->CreateSDiv(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildSDiv()
2349 return wrap(unwrap(B)->CreateExactSDiv(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildExactSDiv()
2354 return wrap(unwrap(B)->CreateFDiv(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildFDiv()
2359 return wrap(unwrap(B)->CreateURem(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildURem()
2364 return wrap(unwrap(B)->CreateSRem(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildSRem()
2369 return wrap(unwrap(B)->CreateFRem(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildFRem()
2374 return wrap(unwrap(B)->CreateShl(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildShl()
2379 return wrap(unwrap(B)->CreateLShr(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildLShr()
2384 return wrap(unwrap(B)->CreateAShr(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildAShr()
2389 return wrap(unwrap(B)->CreateAnd(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildAnd()
2394 return wrap(unwrap(B)->CreateOr(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildOr()
2399 return wrap(unwrap(B)->CreateXor(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildXor()
2405 return wrap(unwrap(B)->CreateBinOp(Instruction::BinaryOps(map_from_llvmopcode(Op)), unwrap(LHS), in LLVMBuildBinOp()
2406 unwrap(RHS), Name)); in LLVMBuildBinOp()
2410 return wrap(unwrap(B)->CreateNeg(unwrap(V), Name)); in LLVMBuildNeg()
2415 return wrap(unwrap(B)->CreateNSWNeg(unwrap(V), Name)); in LLVMBuildNSWNeg()
2420 return wrap(unwrap(B)->CreateNUWNeg(unwrap(V), Name)); in LLVMBuildNUWNeg()
2424 return wrap(unwrap(B)->CreateFNeg(unwrap(V), Name)); in LLVMBuildFNeg()
2428 return wrap(unwrap(B)->CreateNot(unwrap(V), Name)); in LLVMBuildNot()
2435 Type* ITy = Type::getInt32Ty(unwrap(B)->GetInsertBlock()->getContext()); in LLVMBuildMalloc()
2436 Constant* AllocSize = ConstantExpr::getSizeOf(unwrap(Ty)); in LLVMBuildMalloc()
2438 Instruction* Malloc = CallInst::CreateMalloc(unwrap(B)->GetInsertBlock(), in LLVMBuildMalloc()
2439 ITy, unwrap(Ty), AllocSize, in LLVMBuildMalloc()
2441 return wrap(unwrap(B)->Insert(Malloc, Twine(Name))); in LLVMBuildMalloc()
2446 Type* ITy = Type::getInt32Ty(unwrap(B)->GetInsertBlock()->getContext()); in LLVMBuildArrayMalloc()
2447 Constant* AllocSize = ConstantExpr::getSizeOf(unwrap(Ty)); in LLVMBuildArrayMalloc()
2449 Instruction* Malloc = CallInst::CreateMalloc(unwrap(B)->GetInsertBlock(), in LLVMBuildArrayMalloc()
2450 ITy, unwrap(Ty), AllocSize, in LLVMBuildArrayMalloc()
2451 unwrap(Val), nullptr, ""); in LLVMBuildArrayMalloc()
2452 return wrap(unwrap(B)->Insert(Malloc, Twine(Name))); in LLVMBuildArrayMalloc()
2457 return wrap(unwrap(B)->CreateAlloca(unwrap(Ty), nullptr, Name)); in LLVMBuildAlloca()
2462 return wrap(unwrap(B)->CreateAlloca(unwrap(Ty), unwrap(Val), Name)); in LLVMBuildArrayAlloca()
2466 return wrap(unwrap(B)->Insert( in LLVMBuildFree()
2467 CallInst::CreateFree(unwrap(PointerVal), unwrap(B)->GetInsertBlock()))); in LLVMBuildFree()
2473 return wrap(unwrap(B)->CreateLoad(unwrap(PointerVal), Name)); in LLVMBuildLoad()
2478 return wrap(unwrap(B)->CreateStore(unwrap(Val), unwrap(PointerVal))); in LLVMBuildStore()
2499 unwrap(B)->CreateFence(mapFromLLVMOrdering(Ordering), in LLVMBuildFence()
2507 ArrayRef<Value *> IdxList(unwrap(Indices), NumIndices); in LLVMBuildGEP()
2508 return wrap(unwrap(B)->CreateGEP(nullptr, unwrap(Pointer), IdxList, Name)); in LLVMBuildGEP()
2514 ArrayRef<Value *> IdxList(unwrap(Indices), NumIndices); in LLVMBuildInBoundsGEP()
2516 unwrap(B)->CreateInBoundsGEP(nullptr, unwrap(Pointer), IdxList, Name)); in LLVMBuildInBoundsGEP()
2521 return wrap(unwrap(B)->CreateStructGEP(nullptr, unwrap(Pointer), Idx, Name)); in LLVMBuildStructGEP()
2526 return wrap(unwrap(B)->CreateGlobalString(Str, Name)); in LLVMBuildGlobalString()
2531 return wrap(unwrap(B)->CreateGlobalStringPtr(Str, Name)); in LLVMBuildGlobalStringPtr()
2535 Value *P = unwrap<Value>(MemAccessInst); in LLVMGetVolatile()
2542 Value *P = unwrap<Value>(MemAccessInst); in LLVMSetVolatile()
2552 return wrap(unwrap(B)->CreateTrunc(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildTrunc()
2557 return wrap(unwrap(B)->CreateZExt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildZExt()
2562 return wrap(unwrap(B)->CreateSExt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildSExt()
2567 return wrap(unwrap(B)->CreateFPToUI(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPToUI()
2572 return wrap(unwrap(B)->CreateFPToSI(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPToSI()
2577 return wrap(unwrap(B)->CreateUIToFP(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildUIToFP()
2582 return wrap(unwrap(B)->CreateSIToFP(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildSIToFP()
2587 return wrap(unwrap(B)->CreateFPTrunc(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPTrunc()
2592 return wrap(unwrap(B)->CreateFPExt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPExt()
2597 return wrap(unwrap(B)->CreatePtrToInt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildPtrToInt()
2602 return wrap(unwrap(B)->CreateIntToPtr(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildIntToPtr()
2607 return wrap(unwrap(B)->CreateBitCast(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildBitCast()
2612 return wrap(unwrap(B)->CreateAddrSpaceCast(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildAddrSpaceCast()
2617 return wrap(unwrap(B)->CreateZExtOrBitCast(unwrap(Val), unwrap(DestTy), in LLVMBuildZExtOrBitCast()
2623 return wrap(unwrap(B)->CreateSExtOrBitCast(unwrap(Val), unwrap(DestTy), in LLVMBuildSExtOrBitCast()
2629 return wrap(unwrap(B)->CreateTruncOrBitCast(unwrap(Val), unwrap(DestTy), in LLVMBuildTruncOrBitCast()
2635 return wrap(unwrap(B)->CreateCast(Instruction::CastOps(map_from_llvmopcode(Op)), unwrap(Val), in LLVMBuildCast()
2636 unwrap(DestTy), Name)); in LLVMBuildCast()
2641 return wrap(unwrap(B)->CreatePointerCast(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildPointerCast()
2646 return wrap(unwrap(B)->CreateIntCast(unwrap(Val), unwrap(DestTy), in LLVMBuildIntCast()
2652 return wrap(unwrap(B)->CreateFPCast(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPCast()
2660 return wrap(unwrap(B)->CreateICmp(static_cast<ICmpInst::Predicate>(Op), in LLVMBuildICmp()
2661 unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildICmp()
2667 return wrap(unwrap(B)->CreateFCmp(static_cast<FCmpInst::Predicate>(Op), in LLVMBuildFCmp()
2668 unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildFCmp()
2674 return wrap(unwrap(B)->CreatePHI(unwrap(Ty), 0, Name)); in LLVMBuildPhi()
2680 return wrap(unwrap(B)->CreateCall(unwrap(Fn), in LLVMBuildCall()
2681 makeArrayRef(unwrap(Args), NumArgs), in LLVMBuildCall()
2688 return wrap(unwrap(B)->CreateSelect(unwrap(If), unwrap(Then), unwrap(Else), in LLVMBuildSelect()
2694 return wrap(unwrap(B)->CreateVAArg(unwrap(List), unwrap(Ty), Name)); in LLVMBuildVAArg()
2699 return wrap(unwrap(B)->CreateExtractElement(unwrap(VecVal), unwrap(Index), in LLVMBuildExtractElement()
2706 return wrap(unwrap(B)->CreateInsertElement(unwrap(VecVal), unwrap(EltVal), in LLVMBuildInsertElement()
2707 unwrap(Index), Name)); in LLVMBuildInsertElement()
2713 return wrap(unwrap(B)->CreateShuffleVector(unwrap(V1), unwrap(V2), in LLVMBuildShuffleVector()
2714 unwrap(Mask), Name)); in LLVMBuildShuffleVector()
2719 return wrap(unwrap(B)->CreateExtractValue(unwrap(AggVal), Index, Name)); in LLVMBuildExtractValue()
2725 return wrap(unwrap(B)->CreateInsertValue(unwrap(AggVal), unwrap(EltVal), in LLVMBuildInsertValue()
2731 return wrap(unwrap(B)->CreateIsNull(unwrap(Val), Name)); in LLVMBuildIsNull()
2736 return wrap(unwrap(B)->CreateIsNotNull(unwrap(Val), Name)); in LLVMBuildIsNotNull()
2741 return wrap(unwrap(B)->CreatePtrDiff(unwrap(LHS), unwrap(RHS), Name)); in LLVMBuildPtrDiff()
2762 return wrap(unwrap(B)->CreateAtomicRMW(intop, unwrap(PTR), unwrap(Val), in LLVMBuildAtomicRMW()
2775 delete unwrap(MP); in LLVMDisposeModuleProvider()
2828 return unwrap(MemBuf)->getBufferStart(); in LLVMGetBufferStart()
2832 return unwrap(MemBuf)->getBufferSize(); in LLVMGetBufferSize()
2836 delete unwrap(MemBuf); in LLVMDisposeMemoryBuffer()
2852 return wrap(new legacy::FunctionPassManager(unwrap(M))); in LLVMCreateFunctionPassManagerForModule()
2861 return unwrap<legacy::PassManager>(PM)->run(*unwrap(M)); in LLVMRunPassManager()
2865 return unwrap<legacy::FunctionPassManager>(FPM)->doInitialization(); in LLVMInitializeFunctionPassManager()
2869 return unwrap<legacy::FunctionPassManager>(FPM)->run(*unwrap<Function>(F)); in LLVMRunFunctionPassManager()
2873 return unwrap<legacy::FunctionPassManager>(FPM)->doFinalization(); in LLVMFinalizeFunctionPassManager()
2877 delete unwrap(PM); in LLVMDisposePassManager()