From 05e5e070ee73309025e11bea0c15d7fc9c25fea6 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 18 Oct 2001 01:31:22 +0000 Subject: [PATCH] Passes return true if they change something, not if they fail git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@869 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llc/llc.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index 04ae4686867..a072de309e9 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -190,8 +190,11 @@ int main(int argc, char **argv) { Passes.push_back(new EmitAssembly(Target, Out, Out != &cout)); } - // Run our queue of passes all at once now, efficiently. - return Pass::runAllPassesAndFree(M.get(), Passes); + // Run our queue of passes all at once now, efficiently. This form of + // runAllPasses frees the Pass objects after runAllPasses completes. + Pass::runAllPassesAndFree(M.get(), Passes); + + return 0; } -- 2.34.1