[cfe-commits] r43355 - in /cfe/trunk/CodeGen: CodeGenTypes.cpp CodeGenTypes.h
Chris Lattner
clattner at apple.com
Tue Oct 30 11:12:00 PDT 2007
On Oct 25, 2007, at 11:32 AM, Devang Patel wrote:
> Author: dpatel
> Date: Thu Oct 25 13:32:36 2007
> New Revision: 43355
>
> URL: http://llvm.org/viewvc/llvm-project?rev=43355&view=rev
> Log:
> Cache llvm::Type through PATypeHolder.
Ok.
>
> + /// TypeHolderMap - This map keeps cache of llvm::Types (through
> PATypeHolder)
> + /// and maps llvm::Types to corresponding clang::Type.
> llvm::PATypeHolder is
> + /// used instead of llvm::Type because it allows us to bypass
> potential
> + /// dangling type pointers due to type refinement on llvm side.
> + llvm::DenseMap<Type *, llvm::PATypeHolder *> TypeHolderMap;
Please use:
llvm::DenseMap<Type *, llvm::PATypeHolder> TypeHolderMap;
This will avoid having to new the typeholders themselves, and will
fix the leak of them.
-Chris
More information about the cfe-commits
mailing list