[PATCH] D120856: [NFC][Clang][OpaquePtr] Remove calls to Address::deprecated in CGBlocks.cpp
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 3 08:55:06 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3717b9661fd6: [NFC][Clang][OpaquePtr] Remove calls to Address::deprecated in (authored by ahatanak).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120856/new/
https://reviews.llvm.org/D120856
Files:
clang/lib/CodeGen/CGBlocks.cpp
Index: clang/lib/CodeGen/CGBlocks.cpp
===================================================================
--- clang/lib/CodeGen/CGBlocks.cpp
+++ clang/lib/CodeGen/CGBlocks.cpp
@@ -1263,8 +1263,7 @@
// to byref*.
auto &byrefInfo = getBlockByrefInfo(variable);
- addr =
- Address::deprecated(Builder.CreateLoad(addr), byrefInfo.ByrefAlignment);
+ addr = Address(Builder.CreateLoad(addr), Int8Ty, byrefInfo.ByrefAlignment);
addr = Builder.CreateElementBitCast(addr, byrefInfo.Type, "byref.addr");
@@ -1441,7 +1440,7 @@
Address CodeGenFunction::LoadBlockStruct() {
assert(BlockInfo && "not in a block invocation function!");
assert(BlockPointer && "no block pointer set!");
- return Address::deprecated(BlockPointer, BlockInfo->BlockAlign);
+ return Address(BlockPointer, BlockInfo->StructureType, BlockInfo->BlockAlign);
}
llvm::Function *CodeGenFunction::GenerateBlockFunction(
@@ -1938,12 +1937,12 @@
auto AL = ApplyDebugLocation::CreateArtificial(*this);
Address src = GetAddrOfLocalVar(&SrcDecl);
- src = Address::deprecated(Builder.CreateLoad(src), blockInfo.BlockAlign);
+ src = Address(Builder.CreateLoad(src), Int8Ty, blockInfo.BlockAlign);
src = Builder.CreateElementBitCast(src, blockInfo.StructureType,
"block.source");
Address dst = GetAddrOfLocalVar(&DstDecl);
- dst = Address::deprecated(Builder.CreateLoad(dst), blockInfo.BlockAlign);
+ dst = Address(Builder.CreateLoad(dst), Int8Ty, blockInfo.BlockAlign);
dst =
Builder.CreateElementBitCast(dst, blockInfo.StructureType, "block.dest");
@@ -2128,7 +2127,7 @@
auto AL = ApplyDebugLocation::CreateArtificial(*this);
Address src = GetAddrOfLocalVar(&SrcDecl);
- src = Address::deprecated(Builder.CreateLoad(src), blockInfo.BlockAlign);
+ src = Address(Builder.CreateLoad(src), Int8Ty, blockInfo.BlockAlign);
src = Builder.CreateElementBitCast(src, blockInfo.StructureType, "block");
CodeGenFunction::RunCleanupsScope cleanups(*this);
@@ -2373,16 +2372,16 @@
if (generator.needsCopy()) {
// dst->x
Address destField = CGF.GetAddrOfLocalVar(&Dst);
- destField = Address::deprecated(CGF.Builder.CreateLoad(destField),
- byrefInfo.ByrefAlignment);
+ destField = Address(CGF.Builder.CreateLoad(destField), CGF.Int8Ty,
+ byrefInfo.ByrefAlignment);
destField = CGF.Builder.CreateElementBitCast(destField, byrefInfo.Type);
destField =
CGF.emitBlockByrefAddress(destField, byrefInfo, false, "dest-object");
// src->x
Address srcField = CGF.GetAddrOfLocalVar(&Src);
- srcField = Address::deprecated(CGF.Builder.CreateLoad(srcField),
- byrefInfo.ByrefAlignment);
+ srcField = Address(CGF.Builder.CreateLoad(srcField), CGF.Int8Ty,
+ byrefInfo.ByrefAlignment);
srcField = CGF.Builder.CreateElementBitCast(srcField, byrefInfo.Type);
srcField =
CGF.emitBlockByrefAddress(srcField, byrefInfo, false, "src-object");
@@ -2439,8 +2438,8 @@
if (generator.needsDispose()) {
Address addr = CGF.GetAddrOfLocalVar(&Src);
- addr = Address::deprecated(CGF.Builder.CreateLoad(addr),
- byrefInfo.ByrefAlignment);
+ addr = Address(CGF.Builder.CreateLoad(addr), CGF.Int8Ty,
+ byrefInfo.ByrefAlignment);
addr = CGF.Builder.CreateElementBitCast(addr, byrefInfo.Type);
addr = CGF.emitBlockByrefAddress(addr, byrefInfo, false, "object");
@@ -2587,8 +2586,8 @@
// Chase the forwarding address if requested.
if (followForward) {
Address forwardingAddr = Builder.CreateStructGEP(baseAddr, 1, "forwarding");
- baseAddr = Address::deprecated(Builder.CreateLoad(forwardingAddr),
- info.ByrefAlignment);
+ baseAddr = Address(Builder.CreateLoad(forwardingAddr), info.Type,
+ info.ByrefAlignment);
}
return Builder.CreateStructGEP(baseAddr, info.FieldIndex, name);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120856.412741.patch
Type: text/x-patch
Size: 4062 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220303/c1c7635d/attachment-0001.bin>
More information about the cfe-commits
mailing list