[cfe-commits] r82735 - /cfe/trunk/lib/CodeGen/CGExpr.cpp

Ted Kremenek kremenek at apple.com
Sun Sep 27 12:12:22 PDT 2009


Besides having an executable test case, would it be worth having a  
test that sanity checks the generated LLVM IR (perhaps using  
Filecheck).  I defer to the expertise of others here, but even some  
simple testing that looks at the IR might be useful.

On Sep 26, 2009, at 10:24 AM, Fariborz Jahanian wrote:

> I have a test cases which are executable only. Passing a bad address
> need an executable test.
> In fact it is dejagnu test objc-gc-assign-ivar-1.m.
>
> - fariborz
>
> On Sep 26, 2009, at 9:34 AM, Daniel Dunbar wrote:
>
>> Test case?
>>
>> - Daniel
>>
>> On Thu, Sep 24, 2009 at 5:00 PM, Fariborz Jahanian <fjahanian at apple.com
>>> wrote:
>>> Author: fjahanian
>>> Date: Thu Sep 24 19:00:20 2009
>>> New Revision: 82735
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=82735&view=rev
>>> Log:
>>> Fixed another code gen bug in objc's new write-barrier API.
>>>
>>>
>>> Modified:
>>>   cfe/trunk/lib/CodeGen/CGExpr.cpp
>>>
>>> Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=82735&r1=82734&r2=82735&view=diff
>>>
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> = 
>>> ====================================================================
>>> --- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
>>> +++ cfe/trunk/lib/CodeGen/CGExpr.cpp Thu Sep 24 19:00:20 2009
>>> @@ -494,11 +494,12 @@
>>>      assert(Dst.getBaseIvarExp() && "BaseIvarExp is NULL");
>>>      const llvm::Type *ResultType = ConvertType(getContext
>>> ().LongTy);
>>>      llvm::Value *RHS = EmitScalarExpr(Dst.getBaseIvarExp());
>>> +      llvm::Value *dst = RHS;
>>>      RHS = Builder.CreatePtrToInt(RHS, ResultType,
>>> "sub.ptr.rhs.cast");
>>>      llvm::Value *LHS =
>>>        Builder.CreatePtrToInt(LvalueDst, ResultType,
>>> "sub.ptr.lhs.cast");
>>>      llvm::Value *BytesBetween = Builder.CreateSub(LHS, RHS,
>>> "ivar.offset");
>>> -      CGM.getObjCRuntime().EmitObjCIvarAssign(*this, src,  
>>> LvalueDst,
>>> +      CGM.getObjCRuntime().EmitObjCIvarAssign(*this, src, dst,
>>>                                              BytesBetween);
>>>    }
>>>    else if (Dst.isGlobalObjCRef())
>>>
>>>
>>> _______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list