r190447 - Fix ICE in consumed analysis when CFG is null.
DeLesley Hutchins
delesley at google.com
Tue Sep 10 16:10:10 PDT 2013
Author: delesley
Date: Tue Sep 10 18:10:10 2013
New Revision: 190447
URL: http://llvm.org/viewvc/llvm-project?rev=190447&view=rev
Log:
Fix ICE in consumed analysis when CFG is null.
Modified:
cfe/trunk/lib/Analysis/Consumed.cpp
Modified: cfe/trunk/lib/Analysis/Consumed.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/Consumed.cpp?rev=190447&r1=190446&r2=190447&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/Consumed.cpp (original)
+++ cfe/trunk/lib/Analysis/Consumed.cpp Tue Sep 10 18:10:10 2013
@@ -1103,12 +1103,16 @@ bool ConsumedAnalyzer::splitState(const
void ConsumedAnalyzer::run(AnalysisDeclContext &AC) {
const FunctionDecl *D = dyn_cast_or_null<FunctionDecl>(AC.getDecl());
+ if (!D)
+ return;
- if (!D) return;
+ CFG *CFGraph = AC.getCFG();
+ if (!CFGraph)
+ return;
determineExpectedReturnState(AC, D);
- BlockInfo = ConsumedBlockInfo(AC.getCFG());
+ BlockInfo = ConsumedBlockInfo(CFGraph);
PostOrderCFGView *SortedGraph = AC.getAnalysis<PostOrderCFGView>();
More information about the cfe-commits
mailing list