[llvm-commits] [llvm] r60674 - /llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp

Chris Lattner sabre at nondot.org
Sun Dec 7 10:45:15 PST 2008


Author: lattner
Date: Sun Dec  7 12:45:15 2008
New Revision: 60674

URL: http://llvm.org/viewvc/llvm-project?rev=60674&view=rev
Log:
add an assert.  the cast<> below would catch this but a message is more
useful.

Modified:
    llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp

Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=60674&r1=60673&r2=60674&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Sun Dec  7 12:45:15 2008
@@ -454,6 +454,8 @@
 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





More information about the llvm-commits mailing list