[llvm-commits] [llvm] r81316 - in /llvm/trunk: include/llvm/Support/TypeBuilder.h unittests/Support/TypeBuilderTest.cpp

Chris Lattner clattner at apple.com
Tue Sep 8 23:15:53 PDT 2009


On Sep 8, 2009, at 11:12 PM, Jeffrey Yasskin wrote:

> Hi Tanya. I think this should go into 2.6 because the errors it
> prevents are really hard to diagnose (because there are few to no
> assertions that contexts match).

FWIW, I'm fine with this.  Nothing in mainline uses TypeBuilder AFAIK,  
so the risk is low.

-Chris

>
> On Tue, Sep 8, 2009 at 10:04 PM, Jeffrey  
> Yasskin<jyasskin at google.com> wrote:
>> Author: jyasskin
>> Date: Wed Sep  9 00:04:01 2009
>> New Revision: 81316
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=81316&view=rev
>> Log:
>> Make TypeBuilder's result depend on the LLVMContext it's passed.
>> TypeBuilder was using a local static variable to cache its result.  
>> This made it
>> ignore changes in its LLVMContext argument and always return a type  
>> constructed
>> from the argument to the first call.
>>
>> Modified:
>>    llvm/trunk/include/llvm/Support/TypeBuilder.h
>>    llvm/trunk/unittests/Support/TypeBuilderTest.cpp




More information about the llvm-commits mailing list