Home | History | Annotate | Download | only in CodeGen

Lines Matching refs:CGF

1286   void emitCopy(CodeGenFunction &CGF, llvm::Value *destField,
1288 destField = CGF.Builder.CreateBitCast(destField, CGF.VoidPtrTy);
1290 srcField = CGF.Builder.CreateBitCast(srcField, CGF.VoidPtrPtrTy);
1291 llvm::Value *srcValue = CGF.Builder.CreateLoad(srcField);
1295 llvm::Value *flagsVal = llvm::ConstantInt::get(CGF.Int32Ty, flags);
1296 llvm::Value *fn = CGF.CGM.getBlockObjectAssign();
1297 CGF.Builder.CreateCall3(fn, destField, srcValue, flagsVal);
1300 void emitDispose(CodeGenFunction &CGF, llvm::Value *field) {
1301 field = CGF.Builder.CreateBitCast(field, CGF.Int8PtrTy->getPointerTo(0));
1302 llvm::Value *value = CGF.Builder.CreateLoad(field);
1304 CGF.BuildBlockRelease(value, Flags | BLOCK_BYREF_CALLER);
1317 void emitCopy(CodeGenFunction &CGF, llvm::Value *destField,
1319 CGF.EmitARCMoveWeak(destField, srcField);
1322 void emitDispose(CodeGenFunction &CGF, llvm::Value *field) {
1323 CGF.EmitARCDestroyWeak(field);
1338 void emitCopy(CodeGenFunction &CGF, llvm::Value *destField,
1343 llvm::Value *value = CGF.Builder.CreateLoad(srcField);
1346 CGF.Builder.CreateStore(value, destField);
1347 CGF.Builder.CreateStore(null, srcField);
1350 void emitDispose(CodeGenFunction &CGF, llvm::Value *field) {
1351 llvm::Value *value = CGF.Builder.CreateLoad(field);
1352 CGF.EmitARCRelease(value, /*precise*/ false);
1373 void emitCopy(CodeGenFunction &CGF, llvm::Value *destField,
1376 CGF.EmitSynthesizedCXXCopyCtor(destField, srcField, CopyExpr);
1379 void emitDispose(CodeGenFunction &CGF, llvm::Value *field) {
1380 EHScopeStack::stable_iterator cleanupDepth = CGF.EHStack.stable_begin();
1381 CGF.PushDestructorCleanup(VarType, field);
1382 CGF.PopCleanupBlocks(cleanupDepth);
1392 generateByrefCopyHelper(CodeGenFunction &CGF,
1395 ASTContext &Context = CGF.getContext();
1407 CGF.CGM.getTypes().getFunctionInfo(R, args, FunctionType::ExtInfo());
1409 CodeGenTypes &Types = CGF.CGM.getTypes();
1416 "__Block_byref_object_copy_", &CGF.CGM.getModule());
1429 CGF.StartFunction(FD, R, Fn, FI, args, SourceLocation());
1435 llvm::Value *destField = CGF.GetAddrOfLocalVar(&dst);
1436 destField = CGF.Builder.CreateLoad(destField);
1437 destField = CGF.Builder.CreateBitCast(destField, byrefPtrType);
1438 destField = CGF.Builder.CreateStructGEP(destField, 6, "x");
1441 llvm::Value *srcField = CGF.GetAddrOfLocalVar(&src);
1442 srcField = CGF.Builder.CreateLoad(srcField);
1443 srcField = CGF.Builder.CreateBitCast(srcField, byrefPtrType);
1444 srcField = CGF.Builder.CreateStructGEP(srcField, 6, "x");
1446 byrefInfo.emitCopy(CGF, destField, srcField);
1449 CGF.FinishFunction();
1451 return llvm::ConstantExpr::getBitCast(Fn, CGF.Int8PtrTy);
1458 CodeGenFunction CGF(CGM);
1459 return generateByrefCopyHelper(CGF, byrefType, info);
1464 generateByrefDisposeHelper(CodeGenFunction &CGF,
1467 ASTContext &Context = CGF.getContext();
1475 CGF.CGM.getTypes().getFunctionInfo(R, args, FunctionType::ExtInfo());
1477 CodeGenTypes &Types = CGF.CGM.getTypes();
1485 &CGF.CGM.getModule());
1497 CGF.StartFunction(FD, R, Fn, FI, args, SourceLocation());
1500 llvm::Value *V = CGF.GetAddrOfLocalVar(&src);
1501 V = CGF.Builder.CreateLoad(V);
1502 V = CGF.Builder.CreateBitCast(V, byrefType.getPointerTo(0));
1503 V = CGF.Builder.CreateStructGEP(V, 6, "x");
1505 byrefInfo.emitDispose(CGF, V);
1508 CGF.FinishFunction();
1510 return llvm::ConstantExpr::getBitCast(Fn, CGF.Int8PtrTy);
1517 CodeGenFunction CGF(CGM);
1518 return generateByrefDisposeHelper(CGF, byrefType, info);
1793 void Emit(CodeGenFunction &CGF, Flags flags) {
1795 CGF.BuildBlockRelease(Addr, BLOCK_FIELD_IS_BYREF);