Revert r135042. As Chris pointed out, it had no effect, and was based on
authorJay Foad <jay.foad@gmail.com>
Wed, 13 Jul 2011 20:05:31 +0000 (20:05 +0000)
committerJay Foad <jay.foad@gmail.com>
Wed, 13 Jul 2011 20:05:31 +0000 (20:05 +0000)
a complete misunderstanding of the code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135070 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Type.cpp

index 67fad98324896f47e321b7645d7c59e53a216d45..dc5053acc24ca85480eed4478f958c8b4b8ce872 100644 (file)
@@ -343,8 +343,6 @@ FunctionType *FunctionType::get(const Type *ReturnType,
     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;
@@ -395,9 +393,6 @@ StructType *StructType::get(LLVMContext &Context, ArrayRef<Type*> ETypes,
   ST = new StructType(Context);
   ST->setSubclassData(SCDB_IsAnonymous);  // Anonymous struct.
   ST->setBody(ETypes, isPacked);
-
-  Context.pImpl->AnonStructTypes[Key] = ST;
-
   return ST;
 }