Skip to content

Commit

Permalink
Remove a memory leak from the CBackend.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98941 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
jyasskin committed Mar 19, 2010
1 parent 4c42a6d commit 509bcb1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Target/CBackend/CBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ namespace {
static char ID;
explicit CWriter(formatted_raw_ostream &o)
: FunctionPass(&ID), Out(o), IL(0), Mang(0), LI(0),
TheModule(0), TAsm(0), TD(0), OpaqueCounter(0), NextAnonValueNumber(0) {
TheModule(0), TAsm(0), TCtx(0), TD(0), OpaqueCounter(0),
NextAnonValueNumber(0) {
FPCounter = 0;
}

Expand Down Expand Up @@ -147,6 +148,8 @@ namespace {
delete IL;
delete TD;
delete Mang;
delete TCtx;
delete TAsm;
FPConstantMap.clear();
TypeNames.clear();
ByValParams.clear();
Expand Down

0 comments on commit 509bcb1

Please sign in to comment.