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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user