Lines Matching refs:ThunkFn

41                                llvm::Function *ThunkFn, bool ForVTable,  in setThunkProperties()  argument
43 CGM.setFunctionLinkage(GD, ThunkFn); in setThunkProperties()
44 CGM.getCXXABI().setThunkLinkage(ThunkFn, ForVTable, GD, in setThunkProperties()
48 CGM.setGVProperties(ThunkFn, GD); in setThunkProperties()
51 ThunkFn->setDLLStorageClass(llvm::GlobalValue::DefaultStorageClass); in setThunkProperties()
52 ThunkFn->setDSOLocal(true); in setThunkProperties()
55 if (CGM.supportsCOMDAT() && ThunkFn->isWeakForLinker()) in setThunkProperties()
56 ThunkFn->setComdat(CGM.getModule().getOrInsertComdat(ThunkFn->getName())); in setThunkProperties()
525 llvm::Function *ThunkFn = cast<llvm::Function>(Thunk->stripPointerCasts()); in maybeEmitThunk() local
526 if (ThunkFn->getFunctionType() != ThunkFnTy) { in maybeEmitThunk()
527 llvm::GlobalValue *OldThunkFn = ThunkFn; in maybeEmitThunk()
533 ThunkFn = llvm::Function::Create(ThunkFnTy, llvm::Function::ExternalLinkage, in maybeEmitThunk()
535 CGM.SetLLVMFunctionAttributes(MD, FnInfo, ThunkFn, /*IsThunk=*/false); in maybeEmitThunk()
540 llvm::ConstantExpr::getBitCast(ThunkFn, OldThunkFn->getType()); in maybeEmitThunk()
551 if (!ThunkFn->isDeclaration()) { in maybeEmitThunk()
554 return ThunkFn; in maybeEmitThunk()
557 setThunkProperties(CGM, TI, ThunkFn, ForVTable, GD); in maybeEmitThunk()
558 return ThunkFn; in maybeEmitThunk()
566 ThunkFn->addFnAttr("thunk"); in maybeEmitThunk()
568 CGM.SetLLVMFunctionAttributesForDefinition(GD.getDecl(), ThunkFn); in maybeEmitThunk()
576 if (!IsUnprototyped && ThunkFn->isVarArg()) { in maybeEmitThunk()
593 return ThunkFn; in maybeEmitThunk()
594 ThunkFn = in maybeEmitThunk()
595 CodeGenFunction(CGM).GenerateVarArgsThunk(ThunkFn, FnInfo, GD, TI); in maybeEmitThunk()
598 CodeGenFunction(CGM).generateThunk(ThunkFn, FnInfo, GD, TI, IsUnprototyped); in maybeEmitThunk()
601 setThunkProperties(CGM, TI, ThunkFn, ForVTable, GD); in maybeEmitThunk()
602 return ThunkFn; in maybeEmitThunk()