#include "llvm/Function.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/ADT/Statistic.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/PredIteratorCache.h"
#include "llvm/Support/Debug.h"
#include "llvm/Target/TargetData.h"
NonLocalDepInfo::iterator Entry =
std::upper_bound(Cache.begin(), Cache.begin()+NumSortedEntries,
std::make_pair(DirtyBB, MemDepResult()));
- if (Entry != Cache.begin() && (&*Entry)[-1].first == DirtyBB)
+ if (Entry != Cache.begin() && prior(Entry)->first == DirtyBB)
--Entry;
MemDepResult *ExistingResult = 0;
NonLocalDepInfo::iterator Entry =
std::upper_bound(Cache->begin(), Cache->begin()+NumSortedEntries,
std::make_pair(BB, MemDepResult()));
- if (Entry != Cache->begin() && (&*Entry)[-1].first == BB)
+ if (Entry != Cache->begin() && prior(Entry)->first == BB)
--Entry;
MemDepResult *ExistingResult = 0;