More comments please with the various different possibilities coming out here.

-eric

On Wed, May 22, 2013 at 12:10 PM, Adrian Prantl <[email protected]> wrote:
> Author: adrian
> Date: Wed May 22 14:10:15 2013
> New Revision: 182504
>
> URL: http://llvm.org/viewvc/llvm-project?rev=182504&view=rev
> Log:
> Bugfix for r181629:
> - The return type should be a pointer to the class type.
> - Make the condition more specific.
>
> rdar://problem/13359718
>
> Modified:
>     cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
>     cfe/trunk/test/CodeGenObjC/debug-info-instancetype.m
>
> Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
> URL: 
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=182504&r1=182503&r2=182504&view=diff
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Wed May 22 14:10:15 2013
> @@ -2256,8 +2256,10 @@ llvm::DIType CGDebugInfo::getOrCreateFun
>      SmallVector<llvm::Value *, 16> Elts;
>
>      // First element is always return type. For 'void' functions it is NULL.
> -    QualType ResultTy = OMethod->hasRelatedResultType()
> -      ? QualType(OMethod->getClassInterface()->getTypeForDecl(), 0)
> +    QualType ResultTy =
> +      OMethod->getResultType() == CGM.getContext().getObjCInstanceType()
> +      ? CGM.getContext().getPointerType(
> +          QualType(OMethod->getClassInterface()->getTypeForDecl(), 0))
>        : OMethod->getResultType();
>      Elts.push_back(getOrCreateType(ResultTy, F));
>      // "self" pointer is always first argument.
>
> Modified: cfe/trunk/test/CodeGenObjC/debug-info-instancetype.m
> URL: 
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-instancetype.m?rev=182504&r1=182503&r2=182504&view=diff
> ==============================================================================
> --- cfe/trunk/test/CodeGenObjC/debug-info-instancetype.m (original)
> +++ cfe/trunk/test/CodeGenObjC/debug-info-instancetype.m Wed May 22 14:10:15 
> 2013
> @@ -16,7 +16,8 @@
>  // CHECK: ![[FOO:[0-9]+]] = metadata {{.*}}; [ DW_TAG_structure_type ] [Foo]
>  // CHECK: metadata !"+[Foo defaultFoo]", metadata !"", i32 [[@LINE-2]], 
> metadata ![[TYPE:[0-9]+]]
>  // CHECK: ![[TYPE]] = {{.*}} metadata ![[RESULT:[0-9]+]], i32 {{.*}}, i32 
> {{.*}}} ; [ DW_TAG_subroutine_type ]
> -// CHECK: ![[RESULT]] = metadata !{metadata ![[FOO]],
> +// CHECK: ![[RESULT]] = metadata {{.*}}{metadata ![[FOOPTR:[0-9]+]],
> +// CHECK: ![[FOOPTR]] = {{.*}}, metadata ![[FOO]]}{{.*}}[ 
> DW_TAG_pointer_type ] {{.*}} [from Foo]
>  @end
>
>
>
>
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to