[llvm-commits] CVS: llvm/include/llvm/Analysis/DSGraph.h
Vikram Adve
vadve at cs.uiuc.edu
Wed Nov 6 11:01:01 PST 2002
Changes in directory llvm/include/llvm/Analysis:
DSGraph.h updated: 1.26 -> 1.27
---
Log message:
Add const version of function getNodeForValue:
const DSNodeHandle &getNodeForValue(Value *V) const.
---
Diffs of the changes:
Index: llvm/include/llvm/Analysis/DSGraph.h
diff -u llvm/include/llvm/Analysis/DSGraph.h:1.26 llvm/include/llvm/Analysis/DSGraph.h:1.27
--- llvm/include/llvm/Analysis/DSGraph.h:1.26 Wed Nov 6 00:18:56 2002
+++ llvm/include/llvm/Analysis/DSGraph.h Wed Nov 6 11:00:41 2002
@@ -76,6 +76,13 @@
///
DSNodeHandle &getNodeForValue(Value *V) { return ScalarMap[V]; }
+ const DSNodeHandle &getNodeForValue(Value *V) const {
+ std::map<Value*, DSNodeHandle>::const_iterator I = ScalarMap.find(V);
+ assert(I != ScalarMap.end() &&
+ "Use non-const lookup function if node may not be in the map");
+ return I->second;
+ }
+
const DSNodeHandle &getRetNode() const { return RetNode; }
DSNodeHandle &getRetNode() { return RetNode; }
More information about the llvm-commits
mailing list