aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@google.com>2009-12-17 19:55:06 +0000
committerJeffrey Yasskin <jyasskin@google.com>2009-12-17 19:55:06 +0000
commitad715f86c90b06cc4ab9e1336d1bc3bf13ecb16d (patch)
tree4a10bbf7f6939ab35b86d00d5b25e54d669aabf4 /include
parentaf15ffb9127dff185b74ff8b37a9d570ca547c61 (diff)
downloadexternal_llvm-ad715f86c90b06cc4ab9e1336d1bc3bf13ecb16d.zip
external_llvm-ad715f86c90b06cc4ab9e1336d1bc3bf13ecb16d.tar.gz
external_llvm-ad715f86c90b06cc4ab9e1336d1bc3bf13ecb16d.tar.bz2
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')
-rw-r--r--include/llvm/DerivedTypes.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/llvm/DerivedTypes.h b/include/llvm/DerivedTypes.h
index fb51430..c220608 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; }