diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2009-12-17 19:55:06 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2009-12-17 19:55:06 +0000 |
commit | ad715f86c90b06cc4ab9e1336d1bc3bf13ecb16d (patch) | |
tree | 4a10bbf7f6939ab35b86d00d5b25e54d669aabf4 /include/llvm/DerivedTypes.h | |
parent | af15ffb9127dff185b74ff8b37a9d570ca547c61 (diff) |
This fixes a memory leak in OpaqueType found by Google's internal heapchecker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91611 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/DerivedTypes.h')
-rw-r--r-- | include/llvm/DerivedTypes.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/include/llvm/DerivedTypes.h b/include/llvm/DerivedTypes.h index fb51430b48..c22060852a 100644 --- a/include/llvm/DerivedTypes.h +++ b/include/llvm/DerivedTypes.h @@ -502,9 +502,7 @@ class OpaqueType : public DerivedType { public: /// OpaqueType::get - Static factory method for the OpaqueType class... /// - static OpaqueType *get(LLVMContext &C) { - return new OpaqueType(C); // All opaque types are distinct - } + static OpaqueType *get(LLVMContext &C); // Implement support for type inquiry through isa, cast, and dyn_cast: static inline bool classof(const OpaqueType *) { return true; } |