From 1c33975b2192fa4536b1205a1809826ff6e03263 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 27 Mar 2008 17:14:42 +0000 Subject: [PATCH] Don't emit any timings for GRSimple if the CFG is not going to be built. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48882 91177308-0d34-0410-b5e6-96231b3b80d8 --- Driver/ASTConsumers.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Driver/ASTConsumers.cpp b/Driver/ASTConsumers.cpp index d58eca5d35..0ae88dd0c8 100644 --- a/Driver/ASTConsumers.cpp +++ b/Driver/ASTConsumers.cpp @@ -652,6 +652,9 @@ ASTConsumer* clang::CreateGRSimpleVals(Diagnostic &Diags, void GRSimpleValsVisitor::VisitCFG(CFG& C, Decl& CD) { + if (Diags.hasErrorOccurred()) + return; + SourceLocation Loc = CD.getLocation(); if (!Loc.isFileID() || -- 2.40.0