Use isVoidTy().
authorDan Gohman <gohman@apple.com>
Fri, 20 Nov 2009 00:43:11 +0000 (00:43 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 20 Nov 2009 00:43:11 +0000 (00:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89419 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/CaptureTracking.cpp

index 6781dccc9723ace5f2168fd7a97c326cbafe2984..9f27e3dd1808505106fd31f0cfa3f73bbc482788 100644 (file)
@@ -56,8 +56,7 @@ bool llvm::PointerMayBeCaptured(const Value *V,
       // Not captured if the callee is readonly, doesn't return a copy through
       // its return value and doesn't unwind (a readonly function can leak bits
       // by throwing an exception or not depending on the input value).
-      if (CS.onlyReadsMemory() && CS.doesNotThrow() &&
-          I->getType() == Type::getVoidTy(V->getContext()))
+      if (CS.onlyReadsMemory() && CS.doesNotThrow() && I->getType()->isVoidTy())
         break;
 
       // Not captured if only passed via 'nocapture' arguments.  Note that