OSDN Git Service

add an assert. the cast<> below would catch this but a message is more
authorChris Lattner <sabre@nondot.org>
Sun, 7 Dec 2008 18:45:15 +0000 (18:45 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 7 Dec 2008 18:45:15 +0000 (18:45 +0000)
useful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60674 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/MemoryDependenceAnalysis.cpp

index 457e94f..2413bbc 100644 (file)
@@ -454,6 +454,8 @@ MemoryDependenceAnalysis::getNonLocalDependency(Instruction *QueryInst) {
 void MemoryDependenceAnalysis::
 getNonLocalPointerDependency(Value *Pointer, bool isLoad, BasicBlock *FromBB,
                              SmallVectorImpl<NonLocalDepEntry> &Result) {
+  assert(isa<PointerType>(Pointer->getType()) &&
+         "Can't get pointer deps of a non-pointer!");
   Result.clear();
   
   // We know that the pointer value is live into FromBB find the def/clobbers