mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 22:00:10 +00:00
Fix a serious bug where we didn't insert globals into the globalset when
cloning a graph. llvm-svn: 20770
This commit is contained in:
parent
8180e87e51
commit
ecdc1ed631
@ -94,7 +94,12 @@ public:
|
||||
/// getRawEntryRef - This method can be used by clients that are aware of the
|
||||
/// global value equivalence class in effect.
|
||||
DSNodeHandle &getRawEntryRef(Value *V) {
|
||||
return ValueMap[V];
|
||||
std::pair<iterator,bool> IP =
|
||||
ValueMap.insert(std::make_pair(V, DSNodeHandle()));
|
||||
if (IP.second) // Inserted the new entry into the map.
|
||||
if (GlobalValue *GV = dyn_cast<GlobalValue>(V))
|
||||
GlobalSet.insert(GV);
|
||||
return IP.first->second;
|
||||
}
|
||||
|
||||
unsigned count(Value *V) const { return ValueMap.find(V) != ValueMap.end(); }
|
||||
|
Loading…
Reference in New Issue
Block a user