diff options
author | Dan Gohman <gohman@apple.com> | 2008-04-16 15:56:26 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-04-16 15:56:26 +0000 |
commit | 33ef2bb2680de321cd6d2056a1ecce635e6d1c75 (patch) | |
tree | a299cd5beda3524a488c07fe5a0f0558f9e8f67c /tools/llc | |
parent | 917365bef1cfb8493558b76f8e6ceb1e76eba2c5 (diff) | |
download | external_llvm-33ef2bb2680de321cd6d2056a1ecce635e6d1c75.zip external_llvm-33ef2bb2680de321cd6d2056a1ecce635e6d1c75.tar.gz external_llvm-33ef2bb2680de321cd6d2056a1ecce635e6d1c75.tar.bz2 |
Fix a memory leak in llc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49793 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llc')
-rw-r--r-- | tools/llc/llc.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index 929f702..729588d 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -246,7 +246,8 @@ int main(int argc, char **argv) { PM.run(mod); } else { // Build up all of the passes that we want to do to the module. - FunctionPassManager Passes(new ExistingModuleProvider(M.get())); + ExistingModuleProvider Provider(M.release()); + FunctionPassManager Passes(&Provider); Passes.add(new TargetData(*Target.getTargetData())); #ifndef NDEBUG |