Fix GLIBCXX_DEBUG error owing to dereference of end iterator. There's

no guarantee that an instruction returned by getDependency exists in
the maps.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40647 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Greene
2007-07-31 20:01:27 +00:00
parent 054ab94bff
commit df464195fe
2 changed files with 41 additions and 29 deletions
@@ -32,9 +32,14 @@ class Instruction;
class MemoryDependenceAnalysis : public FunctionPass {
private:
DenseMap<Instruction*, std::pair<Instruction*, bool> > depGraphLocal;
std::multimap<Instruction*, Instruction*> reverseDep;
typedef DenseMap<Instruction*, std::pair<Instruction*, bool> >
depMapType;
depMapType depGraphLocal;
typedef std::multimap<Instruction*, Instruction*> reverseDepMapType;
reverseDepMapType reverseDep;
Instruction* getCallSiteDependency(CallSite C, Instruction* start,
bool local = true);