fix memory leak in pass manager when adding an analysis pass that already existed...
authorNuno Lopes <nunoplopes@sapo.pt>
Tue, 4 Nov 2008 23:03:58 +0000 (23:03 +0000)
committerNuno Lopes <nunoplopes@sapo.pt>
Tue, 4 Nov 2008 23:03:58 +0000 (23:03 +0000)
commit641397f2ef0a155159e1085bf594c1535485e3a3
tree155e99e8e66a3c25af0577bb5ad1a59c89aaf51a
parent879b1ac22e6307e3111eac87bfba123fba1ac7a4
fix memory leak in pass manager when adding an analysis pass that already existed. as pass manager takes ownership of the added passes, it has to delete the pass if it isnt added to the pass list
tweak the opt tool so that it doesnt access a Pass after the ownership was taken by the pass manager

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58730 91177308-0d34-0410-b5e6-96231b3b80d8
lib/VMCore/PassManager.cpp
tools/opt/opt.cpp