diff options
author | Mats Jun Larsen <mats@jun.codes> | 2025-02-09 00:13:02 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-08 15:13:02 +0000 |
commit | e0fee55a5549e04bb14d45fba6267bd69285ce77 (patch) | |
tree | 974963cedd54beab90afc20ab9ff969abb4fd2c9 /clang/lib/CodeGen/CGBlocks.cpp | |
parent | 6ff8a06de9ce125023e117014ce4dca8fcc391d7 (diff) | |
download | llvm-e0fee55a5549e04bb14d45fba6267bd69285ce77.zip llvm-e0fee55a5549e04bb14d45fba6267bd69285ce77.tar.gz llvm-e0fee55a5549e04bb14d45fba6267bd69285ce77.tar.bz2 |
[CodeGen] Replace of PointerType::get(Type) with opaque version (NFC) (#124771)
Follow-up to https://github.com/llvm/llvm-project/issues/123569
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGBlocks.cpp | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index aaba354..faef6a5 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -1097,31 +1097,10 @@ llvm::Type *CodeGenModule::getBlockDescriptorType() { if (BlockDescriptorType) return BlockDescriptorType; - llvm::Type *UnsignedLongTy = - getTypes().ConvertType(getContext().UnsignedLongTy); - - // struct __block_descriptor { - // unsigned long reserved; - // unsigned long block_size; - // - // // later, the following will be added - // - // struct { - // void (*copyHelper)(); - // void (*copyHelper)(); - // } helpers; // !!! optional - // - // const char *signature; // the block signature - // const char *layout; // reserved - // }; - BlockDescriptorType = llvm::StructType::create( - "struct.__block_descriptor", UnsignedLongTy, UnsignedLongTy); - - // Now form a pointer to that. unsigned AddrSpace = 0; if (getLangOpts().OpenCL) AddrSpace = getContext().getTargetAddressSpace(LangAS::opencl_constant); - BlockDescriptorType = llvm::PointerType::get(BlockDescriptorType, AddrSpace); + BlockDescriptorType = llvm::PointerType::get(getLLVMContext(), AddrSpace); return BlockDescriptorType; } |