diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-04-25 22:57:55 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-04-25 22:57:55 +0000 |
commit | 4f76f4ae311e6af4b34017567cbb5e57b3d1a5d5 (patch) | |
tree | f9b169b7825eb720002fa236cdddf620a2c5c640 /clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | |
parent | 2688e4aba65f6979521917af2c598eaa70906bae (diff) | |
download | bcm5719-llvm-4f76f4ae311e6af4b34017567cbb5e57b3d1a5d5.tar.gz bcm5719-llvm-4f76f4ae311e6af4b34017567cbb5e57b3d1a5d5.zip |
Re-enable disable free optimization where the FrontendAction is not freed when -disable-free is passed. This accidentally was commited in r128011.
llvm-svn: 130168
Diffstat (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp')
-rw-r--r-- | clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index 0f02f7ac618..664b53351dc 100644 --- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -149,8 +149,11 @@ bool clang::ExecuteCompilerInvocation(CompilerInstance *Clang) { if (!Clang->getDiagnostics().hasErrorOccurred()) { // Create and execute the frontend action. llvm::OwningPtr<FrontendAction> Act(CreateFrontendAction(*Clang)); - if (Act) + if (Act) { Success = Clang->ExecuteAction(*Act); + if (Clang->getFrontendOpts().DisableFree) + Act.take(); + } } return Success; |