From: Eric Christopher Date: Thu, 12 Apr 2012 00:35:04 +0000 (+0000) Subject: The copy and destroy helper functions aren't prototyped, don't call them X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e5bbebb4d14347700ff0b1838f14cae3b8a35c69;p=clang The copy and destroy helper functions aren't prototyped, don't call them so. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154569 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp index 09d3125ce8..b19b696eae 100644 --- a/lib/CodeGen/CGBlocks.cpp +++ b/lib/CodeGen/CGBlocks.cpp @@ -1208,7 +1208,7 @@ CodeGenFunction::GenerateCopyHelperFunction(const CGBlockInfo &blockInfo) { SC_Static, SC_None, false, - true); + false); StartFunction(FD, C.VoidTy, Fn, FI, args, SourceLocation()); llvm::Type *structPtrTy = blockInfo.StructureType->getPointerTo(); @@ -1323,7 +1323,7 @@ CodeGenFunction::GenerateDestroyHelperFunction(const CGBlockInfo &blockInfo) { SourceLocation(), II, C.VoidTy, 0, SC_Static, SC_None, - false, true); + false, false); StartFunction(FD, C.VoidTy, Fn, FI, args, SourceLocation()); llvm::Type *structPtrTy = blockInfo.StructureType->getPointerTo(); diff --git a/test/CodeGenObjC/debug-info-block-helper.m b/test/CodeGenObjC/debug-info-block-helper.m index ac164618f8..83db0c97e5 100644 --- a/test/CodeGenObjC/debug-info-block-helper.m +++ b/test/CodeGenObjC/debug-info-block-helper.m @@ -2,7 +2,7 @@ // RUN: %clang_cc1 -emit-llvm -fblocks -g -triple x86_64-apple-darwin10 -fobjc-fragile-abi %s -o - | FileCheck %s extern void foo(void(^)(void)); -// CHECK: !42 = metadata !{i32 {{.*}}, i32 0, metadata !27, metadata !"__destroy_helper_block_", metadata !"__destroy_helper_block_", metadata !"", metadata !27, i32 24, metadata !43, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void (i8*)* @__destroy_helper_block_, null, null, metadata !45, i32 24} ; [ DW_TAG_subprogram ] +// CHECK: metadata !{i32 786478, i32 0, metadata !27, metadata !"__destroy_helper_block_", metadata !"__destroy_helper_block_", metadata !"", metadata !27, i32 24, metadata !43, i1 true, i1 true, i32 0, i32 0, null, i32 0, i1 false, void (i8*)* @__destroy_helper_block_, null, null, metadata !45, i32 24} ; [ DW_TAG_subprogram ] @interface NSObject { struct objc_object *isa;