[llvm-commits] [llvm] r135042 - /llvm/trunk/lib/VMCore/Type.cpp
Jay Foad
jay.foad at gmail.com
Wed Jul 13 03:45:09 PDT 2011
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.
Jay.
On 13 July 2011 11:39, Jay Foad <jay.foad at gmail.com> wrote:
> Author: foad
> Date: Wed Jul 13 05:39:49 2011
> New Revision: 135042
>
> URL: http://llvm.org/viewvc/llvm-project?rev=135042&view=rev
> Log:
> Really cache function types and anonymous struct types.
>
> Modified:
> llvm/trunk/lib/VMCore/Type.cpp
>
> Modified: llvm/trunk/lib/VMCore/Type.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Type.cpp?rev=135042&r1=135041&r2=135042&view=diff
> ==============================================================================
> --- llvm/trunk/lib/VMCore/Type.cpp (original)
> +++ llvm/trunk/lib/VMCore/Type.cpp Wed Jul 13 05:39:49 2011
> @@ -343,6 +343,8 @@
> FT = (FunctionType*) operator new(sizeof(FunctionType) +
> sizeof(Type*)*(Params.size()+1));
> new (FT) FunctionType(ReturnType, Params, isVarArg);
> +
> + ReturnType->getContext().pImpl->FunctionTypes[Key] = FT;
> }
>
> return FT;
> @@ -393,6 +395,9 @@
> ST = new StructType(Context);
> ST->setSubclassData(SCDB_IsAnonymous); // Anonymous struct.
> ST->setBody(ETypes, isPacked);
> +
> + Context.pImpl->AnonStructTypes[Key] = ST;
> +
> return ST;
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list