[llvm-commits] [llvm] r135042 - /llvm/trunk/lib/VMCore/Type.cpp
Jay Foad
jay.foad at gmail.com
Wed Jul 13 11:44:12 PDT 2011
On 13 July 2011 19:40, Chris Lattner <clattner at apple.com> wrote:
>
> On Jul 13, 2011, at 3:45 AM, Jay Foad wrote:
>
>> Chris,
>>
>> I assume this was just an oversight? I'm surprised we got away with
>> it, cos it seems like it would break pointer-equivalence of equivalent
>> Types.
>
> Hi Jay,
>
> I don't think this patch is doing anything. Previously we had:
>
> StructType *&ST = Context.pImpl->AnonStructTypes[Key];
>
> if (ST) return ST;
>
> // Value not found. Create a new type!
> ST = new StructType(Context);
>
>
> Because "ST" is a reference into the map, the assignment is actually adding the mapping.
Right. Sorry. I'll back it out.
Jay.
More information about the llvm-commits
mailing list