I love how using out of scope variables is not an error with GCC, no really I do.
authorChris Lattner <sabre@nondot.org>
Sun, 7 Dec 2008 00:38:27 +0000 (00:38 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 7 Dec 2008 00:38:27 +0000 (00:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60643 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/MemoryDependenceAnalysis.cpp

index 7c00a6c2f69561f2eb0899e2241812b8f04ab3b8..9dad8bcf45c56e1f69aa97ef5b9d122d371171ea 100644 (file)
@@ -118,7 +118,7 @@ getDependencyFrom(Instruction *QueryInst, BasicBlock::iterator ScanIt,
   Value *MemPtr = 0;
   uint64_t MemSize = 0;
   
-  if (StoreInstS = dyn_cast<StoreInst>(QueryInst)) {
+  if (StoreInst *S = dyn_cast<StoreInst>(QueryInst)) {
     // If this is a volatile store, don't mess around with it.  Just return the
     // previous instruction as a clobber.
     if (S->isVolatile())
@@ -126,10 +126,10 @@ getDependencyFrom(Instruction *QueryInst, BasicBlock::iterator ScanIt,
 
     MemPtr = S->getPointerOperand();
     MemSize = TD->getTypeStoreSize(S->getOperand(0)->getType());
-  } else if (LoadInstLI = dyn_cast<LoadInst>(QueryInst)) {
+  } else if (LoadInst *LI = dyn_cast<LoadInst>(QueryInst)) {
     // If this is a volatile load, don't mess around with it.  Just return the
     // previous instruction as a clobber.
-    if (S->isVolatile())
+    if (LI->isVolatile())
       return MemDepResult::getClobber(--ScanIt);
     
     MemPtr = LI->getPointerOperand();