summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/FrontendAction.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2014-04-24 00:51:03 +0000
committerNico Weber <nicolasweber@gmx.de>2014-04-24 00:51:03 +0000
commit1ada62654ffcefc9f2d2c695ba62aa1c46ab0f0d (patch)
treed9c1932fada13fba32dc6370f2d7d5f7e9e61ddd /clang/lib/Frontend/FrontendAction.cpp
parent1a80595a2b803949608e11d522d715a54c3a11bc (diff)
downloadbcm5719-llvm-1ada62654ffcefc9f2d2c695ba62aa1c46ab0f0d.tar.gz
bcm5719-llvm-1ada62654ffcefc9f2d2c695ba62aa1c46ab0f0d.zip
Bury leaked sema pointer when reading from AST files.
Should suppress several LSan reports. llvm-svn: 207056
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r--clang/lib/Frontend/FrontendAction.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index dfe3d85ba73..6cbd8ba193e 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/lib/Frontend/FrontendAction.cpp
@@ -415,7 +415,7 @@ void FrontendAction::EndSourceFile() {
if (CI.getFrontendOpts().DisableFree) {
BuryPointer(CI.takeASTConsumer());
if (!isCurrentFileAST()) {
- BuryPointer(CI.takeSema());
+ CI.resetAndLeakSema();
CI.resetAndLeakASTContext();
}
} else {
@@ -444,7 +444,7 @@ void FrontendAction::EndSourceFile() {
CI.clearOutputFiles(/*EraseFiles=*/shouldEraseOutputFiles());
if (isCurrentFileAST()) {
- CI.takeSema();
+ CI.resetAndLeakSema();
CI.resetAndLeakASTContext();
CI.resetAndLeakPreprocessor();
CI.resetAndLeakSourceManager();
OpenPOWER on IntegriCloud