mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-01 17:32:36 +00:00
Add const version of function getNodeForValue:
const DSNodeHandle &getNodeForValue(Value *V) const. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4566 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8aa5aeab84
commit
db7ab14434
@ -76,6 +76,13 @@ public:
|
||||
///
|
||||
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; }
|
||||
|
||||
|
@ -76,6 +76,13 @@ public:
|
||||
///
|
||||
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; }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user