aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2009-01-18 19:57:27 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2009-01-18 19:57:27 +0000
commit460b0ac80382fa73337d21dd052c1f18b27435d8 (patch)
tree4ca6450f20cac6809bd316b8f0919ecedf4517e3 /lib/AST/Decl.cpp
parentcd965b97cfac7b7a53a835810ec2bc2ac7a9dd1a (diff)
fix deallocation of FunctionDecl::ParamInfo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62469 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r--lib/AST/Decl.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 8ae9311017..5ec6aff4f5 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -224,17 +224,15 @@ VarDecl::~VarDecl() {
// FunctionDecl Implementation
//===----------------------------------------------------------------------===//
-FunctionDecl::~FunctionDecl() {
- delete[] ParamInfo;
-}
-
void FunctionDecl::Destroy(ASTContext& C) {
if (Body)
Body->Destroy(C);
for (param_iterator I=param_begin(), E=param_end(); I!=E; ++I)
(*I)->Destroy(C);
-
+
+ C.getAllocator().Deallocate(ParamInfo);
+
Decl::Destroy(C);
}