aboutsummaryrefslogtreecommitdiff
path: root/Driver/clang.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Driver/clang.cpp')
-rw-r--r--Driver/clang.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index 77779f7e80..f568302444 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -821,11 +821,10 @@ static void ProcessInputFile(Preprocessor &PP, unsigned MainFileID,
if (Consumer) {
if (VerifyDiagnostics)
- exit (CheckASTConsumer(PP, MainFileID, Consumer));
- else
- ParseAST(PP, MainFileID, *Consumer, Stats);
-
- delete Consumer;
+ exit(CheckASTConsumer(PP, MainFileID, Consumer));
+
+ // This deletes Consumer.
+ ParseAST(PP, MainFileID, Consumer, Stats);
}
if (Stats) {