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()
524 llvm::Function *ThunkFn = cast<llvm::Function>(Thunk->stripPointerCasts()); in maybeEmitThunk() local
525 if (ThunkFn->getFunctionType() != ThunkFnTy) { in maybeEmitThunk()
526 llvm::GlobalValue *OldThunkFn = ThunkFn; in maybeEmitThunk()
532 ThunkFn = llvm::Function::Create(ThunkFnTy, llvm::Function::ExternalLinkage, in maybeEmitThunk()
534 CGM.SetLLVMFunctionAttributes(MD, FnInfo, ThunkFn); in maybeEmitThunk()
539 llvm::ConstantExpr::getBitCast(ThunkFn, OldThunkFn->getType()); in maybeEmitThunk()
550 if (!ThunkFn->isDeclaration()) { in maybeEmitThunk()
553 return ThunkFn; in maybeEmitThunk()
556 setThunkProperties(CGM, TI, ThunkFn, ForVTable, GD); in maybeEmitThunk()
557 return ThunkFn; in maybeEmitThunk()
565 ThunkFn->addFnAttr("thunk"); in maybeEmitThunk()
567 CGM.SetLLVMFunctionAttributesForDefinition(GD.getDecl(), ThunkFn); in maybeEmitThunk()
575 if (!IsUnprototyped && ThunkFn->isVarArg()) { in maybeEmitThunk()
592 return ThunkFn; in maybeEmitThunk()
593 ThunkFn = in maybeEmitThunk()
594 CodeGenFunction(CGM).GenerateVarArgsThunk(ThunkFn, FnInfo, GD, TI); in maybeEmitThunk()
597 CodeGenFunction(CGM).generateThunk(ThunkFn, FnInfo, GD, TI, IsUnprototyped); in maybeEmitThunk()
600 setThunkProperties(CGM, TI, ThunkFn, ForVTable, GD); in maybeEmitThunk()
601 return ThunkFn; in maybeEmitThunk()