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
diff --git a/Driver/ASTConsumers.cpp b/Driver/ASTConsumers.cpp
index d58eca5..0ae88dd 100644
--- a/Driver/ASTConsumers.cpp
+++ b/Driver/ASTConsumers.cpp
@@ -652,6 +652,9 @@
void GRSimpleValsVisitor::VisitCFG(CFG& C, Decl& CD) {
+ if (Diags.hasErrorOccurred())
+ return;
+
SourceLocation Loc = CD.getLocation();
if (!Loc.isFileID() ||