mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Avoid leaking the FunctionPassManager from opt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99180 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1cde4af157
commit
bd85e8e3ad
@ -424,9 +424,9 @@ int main(int argc, char **argv) {
|
||||
if (TD)
|
||||
Passes.add(TD);
|
||||
|
||||
FunctionPassManager *FPasses = NULL;
|
||||
OwningPtr<FunctionPassManager> FPasses;
|
||||
if (OptLevelO1 || OptLevelO2 || OptLevelO3) {
|
||||
FPasses = new FunctionPassManager(M.get());
|
||||
FPasses.reset(new FunctionPassManager(M.get()));
|
||||
if (TD)
|
||||
FPasses->add(new TargetData(*TD));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user