diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-05-04 13:01:42 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-05-04 13:01:42 +0000 |
commit | 20f0b01a9260f58370c33584fce055d2d8dda9e6 (patch) | |
tree | 2be6c6a7033e3cbec7fc45033adcf8696ad692aa /clang/lib/Frontend/FrontendAction.cpp | |
parent | d41e506342fb284dc4d54942271c0d1ff1bc6a55 (diff) | |
download | bcm5719-llvm-20f0b01a9260f58370c33584fce055d2d8dda9e6.tar.gz bcm5719-llvm-20f0b01a9260f58370c33584fce055d2d8dda9e6.zip |
Revert "Frontend: Stop leaking when not -disable-free"
This reverts commit r236419, since it caused some bots to fail. On:
http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/26124
http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/35086
these tests:
FAIL: Clang::import-decl.cpp
FAIL: Clang::floating-literal.c
FAIL: Clang::x86_64-linux-android.c
fail with this output:
Command Output (stderr):
--
Stack dump:
0. Program arguments: /var/lib/buildbot/slaves/hexagon-build-03/clang-hexagon-elf/llvm.obj/Release+Asserts/bin/clang -cc1 -internal-isystem /var/lib/buildbot/slaves/hexagon-build-03/clang-hexagon-elf/llvm.obj/Release+Asserts/bin/../lib/clang/3.7.0/include -nostdsysteminc -ast-print -x ast -
/var/lib/buildbot/slaves/hexagon-build-03/clang-hexagon-elf/llvm.obj/tools/clang/test/Modules/Output/import-decl.cpp.script: line 3: 9665 Segmentation fault (core dumped) /var/lib/buildbot/slaves/hexagon-build-03/clang-hexagon-elf/llvm.obj/Release+Asserts/bin/clang -cc1 -internal-isystem /var/lib/buildbot/slaves/hexagon-build-03/clang-hexagon-elf/llvm.obj/Release+Asserts/bin/../lib/clang/3.7.0/include -nostdsysteminc -ast-print -x ast - < /var/lib/buildbot/slaves/hexagon-build-03/clang-hexagon-elf/llvm.obj/tools/clang/test/Modules/Output/import-decl.cpp.tmp.ast
9666 Done | /var/lib/buildbot/slaves/hexagon-build-03/clang-hexagon-elf/llvm.obj/Release+Asserts/bin/FileCheck /var/lib/buildbot/slaves/hexagon-build-03/clang-hexagon-elf/llvm.src/tools/clang/test/Modules/import-decl.cpp
--
llvm-svn: 236422
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r-- | clang/lib/Frontend/FrontendAction.cpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp index 3c136262ef7..d42ca718c39 100644 --- a/clang/lib/Frontend/FrontendAction.cpp +++ b/clang/lib/Frontend/FrontendAction.cpp @@ -494,20 +494,13 @@ void FrontendAction::EndSourceFile() { // FrontendAction. CI.clearOutputFiles(/*EraseFiles=*/shouldEraseOutputFiles()); + // FIXME: Only do this if DisableFree is set. if (isCurrentFileAST()) { - if (DisableFree) { - CI.resetAndLeakSema(); - CI.resetAndLeakASTContext(); - CI.resetAndLeakPreprocessor(); - CI.resetAndLeakSourceManager(); - CI.resetAndLeakFileManager(); - } else { - CI.setSema(nullptr); - CI.setASTContext(nullptr); - CI.setPreprocessor(nullptr); - CI.setSourceManager(nullptr); - CI.setFileManager(nullptr); - } + CI.resetAndLeakSema(); + CI.resetAndLeakASTContext(); + CI.resetAndLeakPreprocessor(); + CI.resetAndLeakSourceManager(); + CI.resetAndLeakFileManager(); } setCompilerInstance(nullptr); |