mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
Don't dereference the end() iterator. This was
causing a bunch of failures when running "make ENABLE_EXPENSIVE_CHECKS=1 check". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60832 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -21,6 +21,7 @@
|
|||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
#include "llvm/Analysis/AliasAnalysis.h"
|
#include "llvm/Analysis/AliasAnalysis.h"
|
||||||
#include "llvm/ADT/Statistic.h"
|
#include "llvm/ADT/Statistic.h"
|
||||||
|
#include "llvm/ADT/STLExtras.h"
|
||||||
#include "llvm/Support/PredIteratorCache.h"
|
#include "llvm/Support/PredIteratorCache.h"
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
#include "llvm/Target/TargetData.h"
|
#include "llvm/Target/TargetData.h"
|
||||||
@ -401,7 +402,7 @@ MemoryDependenceAnalysis::getNonLocalCallDependency(CallSite QueryCS) {
|
|||||||
NonLocalDepInfo::iterator Entry =
|
NonLocalDepInfo::iterator Entry =
|
||||||
std::upper_bound(Cache.begin(), Cache.begin()+NumSortedEntries,
|
std::upper_bound(Cache.begin(), Cache.begin()+NumSortedEntries,
|
||||||
std::make_pair(DirtyBB, MemDepResult()));
|
std::make_pair(DirtyBB, MemDepResult()));
|
||||||
if (Entry != Cache.begin() && (&*Entry)[-1].first == DirtyBB)
|
if (Entry != Cache.begin() && prior(Entry)->first == DirtyBB)
|
||||||
--Entry;
|
--Entry;
|
||||||
|
|
||||||
MemDepResult *ExistingResult = 0;
|
MemDepResult *ExistingResult = 0;
|
||||||
@ -506,7 +507,7 @@ GetNonLocalInfoForBlock(Value *Pointer, uint64_t PointeeSize,
|
|||||||
NonLocalDepInfo::iterator Entry =
|
NonLocalDepInfo::iterator Entry =
|
||||||
std::upper_bound(Cache->begin(), Cache->begin()+NumSortedEntries,
|
std::upper_bound(Cache->begin(), Cache->begin()+NumSortedEntries,
|
||||||
std::make_pair(BB, MemDepResult()));
|
std::make_pair(BB, MemDepResult()));
|
||||||
if (Entry != Cache->begin() && (&*Entry)[-1].first == BB)
|
if (Entry != Cache->begin() && prior(Entry)->first == BB)
|
||||||
--Entry;
|
--Entry;
|
||||||
|
|
||||||
MemDepResult *ExistingResult = 0;
|
MemDepResult *ExistingResult = 0;
|
||||||
|
Reference in New Issue
Block a user