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()
527 llvm::Function *ThunkFn = cast<llvm::Function>(Thunk->stripPointerCasts()); in maybeEmitThunk() local
528 if (ThunkFn->getFunctionType() != ThunkFnTy) { in maybeEmitThunk()
529 llvm::GlobalValue *OldThunkFn = ThunkFn; in maybeEmitThunk()
535 ThunkFn = llvm::Function::Create(ThunkFnTy, llvm::Function::ExternalLinkage, in maybeEmitThunk()
537 CGM.SetLLVMFunctionAttributes(MD, FnInfo, ThunkFn, /*IsThunk=*/false); in maybeEmitThunk()
542 llvm::ConstantExpr::getBitCast(ThunkFn, OldThunkFn->getType()); in maybeEmitThunk()
553 if (!ThunkFn->isDeclaration()) { in maybeEmitThunk()
556 return ThunkFn; in maybeEmitThunk()
559 setThunkProperties(CGM, TI, ThunkFn, ForVTable, GD); in maybeEmitThunk()
560 return ThunkFn; in maybeEmitThunk()
568 ThunkFn->addFnAttr("thunk"); in maybeEmitThunk()
570 CGM.SetLLVMFunctionAttributesForDefinition(GD.getDecl(), ThunkFn); in maybeEmitThunk()
578 if (!IsUnprototyped && ThunkFn->isVarArg()) { in maybeEmitThunk()
595 return ThunkFn; in maybeEmitThunk()
596 ThunkFn = in maybeEmitThunk()
597 CodeGenFunction(CGM).GenerateVarArgsThunk(ThunkFn, FnInfo, GD, TI); in maybeEmitThunk()
600 CodeGenFunction(CGM).generateThunk(ThunkFn, FnInfo, GD, TI, IsUnprototyped); in maybeEmitThunk()
603 setThunkProperties(CGM, TI, ThunkFn, ForVTable, GD); in maybeEmitThunk()
604 return ThunkFn; in maybeEmitThunk()