summaryrefslogtreecommitdiffstats
path: root/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2013-12-27 08:11:08 +0000
committerKostya Serebryany <kcc@google.com>2013-12-27 08:11:08 +0000
commitce2c726e99b4fde2f6adff6772e8fa6396b9f332 (patch)
tree19d05e1f2cd84a70d98c1b170f1d5f475329c28e /clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
parente6ed0f255f0e5a7ace2ad5501e7ddf924f03a550 (diff)
downloadbcm5719-llvm-ce2c726e99b4fde2f6adff6772e8fa6396b9f332.tar.gz
bcm5719-llvm-ce2c726e99b4fde2f6adff6772e8fa6396b9f332.zip
Bury leaked pointers in a global array to silence a leak detector in --disable-free mode
Summary: This is an alternative to http://llvm-reviews.chandlerc.com/D2475 suggested by Chandler. Reviewers: chandlerc, rnk, dblaikie CC: cfe-commits, earthdok Differential Revision: http://llvm-reviews.chandlerc.com/D2478 llvm-svn: 198073
Diffstat (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp')
-rw-r--r--clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
index e22f9ba0523..e14fb2340e6 100644
--- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
+++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
@@ -21,6 +21,7 @@
#include "clang/Frontend/FrontendActions.h"
#include "clang/Frontend/FrontendDiagnostic.h"
#include "clang/Frontend/FrontendPluginRegistry.h"
+#include "clang/Frontend/Utils.h"
#include "clang/Rewrite/Frontend/FrontendActions.h"
#include "clang/StaticAnalyzer/Frontend/FrontendActions.h"
#include "llvm/Option/OptTable.h"
@@ -236,6 +237,6 @@ bool clang::ExecuteCompilerInvocation(CompilerInstance *Clang) {
return false;
bool Success = Clang->ExecuteAction(*Act);
if (Clang->getFrontendOpts().DisableFree)
- Act.take();
+ BuryPointer(Act.take());
return Success;
}
OpenPOWER on IntegriCloud