[llvm-commits] [llvm] r135042 - /llvm/trunk/lib/VMCore/Type.cpp
Chris Lattner
clattner at apple.com
Wed Jul 13 11:40:18 PDT 2011
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.
-Chris
More information about the llvm-commits
mailing list