[cfe-commits] r66940 - /cfe/trunk/lib/CodeGen/CodeGenTypes.cpp

Fariborz Jahanian fjahanian at apple.com
Fri Mar 13 14:34:08 PDT 2009


I attached a test case to the radar. It is not easy to come up with a  
small test case (trust me I tried :).
I can add the test case (which I made somewhat smaller and is attached  
to the radar) if Chris can
OK it.

- Fariborz

On Mar 13, 2009, at 1:56 PM, Daniel Dunbar wrote:

> Nice catch. I think I wrote this and thought I proved to myself that  
> recursion wasn't possible but I guess I goofed!
>
> Would be nice to have a test case for this if you have one handy.  
> Its the kind of thing worth dropping in test/Coverage/objc-language- 
> features.inc
>
>  - Daniel
>
> On Fri, Mar 13, 2009 at 1:36 PM, Fariborz Jahanian <fjahanian at apple.com 
> > wrote:
> Author: fjahanian
> Date: Fri Mar 13 15:36:41 2009
> New Revision: 66940
>
> URL: http://llvm.org/viewvc/llvm-project?rev=66940&view=rev
> Log:
> Fix a bug in building function pointer type
> corresponding to block pointer.
>
>
> Modified:
>    cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
>
> Modified: cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenTypes.cpp?rev=66940&r1=66939&r2=66940&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- cfe/trunk/lib/CodeGen/CodeGenTypes.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CodeGenTypes.cpp Fri Mar 13 15:36:41 2009
> @@ -380,8 +380,9 @@
>
>   case Type::BlockPointer: {
>     const QualType FTy = cast<BlockPointerType>(Ty).getPointeeType();
> -    return llvm::PointerType::get(ConvertTypeRecursive(FTy),
> -                                  FTy.getAddressSpace());
> +    llvm::OpaqueType *PointeeType = llvm::OpaqueType::get();
> +    PointersToResolve.push_back(std::make_pair(FTy, PointeeType));
> +    return llvm::PointerType::get(PointeeType,  
> FTy.getAddressSpace());
>   }
>
>   case Type::MemberPointer:
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20090313/f148bbbd/attachment.html>


More information about the cfe-commits mailing list