[llvm-commits] CVS: llvm/include/llvm/Analysis/DSGraph.h
Chris Lattner
lattner at cs.uiuc.edu
Mon Feb 3 18:05:01 PST 2003
Changes in directory llvm/include/llvm/Analysis:
DSGraph.h updated: 1.42 -> 1.43
---
Log message:
Add sanity check
---
Diffs of the changes:
Index: llvm/include/llvm/Analysis/DSGraph.h
diff -u llvm/include/llvm/Analysis/DSGraph.h:1.42 llvm/include/llvm/Analysis/DSGraph.h:1.43
--- llvm/include/llvm/Analysis/DSGraph.h:1.42 Mon Feb 3 13:10:24 2003
+++ llvm/include/llvm/Analysis/DSGraph.h Mon Feb 3 18:03:57 2003
@@ -53,7 +53,10 @@
~DSGraph();
bool hasFunction() const { return Func != 0; }
- Function &getFunction() const { return *Func; }
+ Function &getFunction() const {
+ assert(hasFunction() && "Cannot call getFunction on graph without a fn!");
+ return *Func;
+ }
DSGraph *getGlobalsGraph() const { return GlobalsGraph; }
void setGlobalsGraph(DSGraph *G) { GlobalsGraph = G; }
More information about the llvm-commits
mailing list