use Value* constructor of CallSite to create potentially improper site, and test...
authorGabor Greif <ggreif@gmail.com>
Wed, 28 Jul 2010 14:28:18 +0000 (14:28 +0000)
committerGabor Greif <ggreif@gmail.com>
Wed, 28 Jul 2010 14:28:18 +0000 (14:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109581 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/DeadStoreElimination.cpp

index dddefeda083a58740f7ae3d27646537136343d7f..ce15f48958d37adb4860bc4b53e83c519a520a19 100644 (file)
@@ -401,10 +401,9 @@ bool DSE::handleEndBlock(BasicBlock &BB) {
       }
       
       continue;
-    } else if (CallSite::get(BBI).getInstruction() != 0) {
+    } else if (CallSite CS = cast<Value>(BBI)) {
       // If this call does not access memory, it can't
       // be undeadifying any of our pointers.
-      CallSite CS = CallSite::get(BBI);
       if (AA.doesNotAccessMemory(CS))
         continue;