aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/CaptureTracking.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-11-20 00:43:11 +0000
committerDan Gohman <gohman@apple.com>2009-11-20 00:43:11 +0000
commit01956f5a6b3f753df31fffe4c1494e03164239fe (patch)
tree579467d1ff072b60f04e58ae2959450d8c388493 /llvm/lib/Analysis/CaptureTracking.cpp
parentc0cc2ae45bae1f66996f32ec1a543656817879b1 (diff)
downloadllvm-01956f5a6b3f753df31fffe4c1494e03164239fe.zip
llvm-01956f5a6b3f753df31fffe4c1494e03164239fe.tar.gz
llvm-01956f5a6b3f753df31fffe4c1494e03164239fe.tar.bz2
Use isVoidTy().
llvm-svn: 89419
Diffstat (limited to 'llvm/lib/Analysis/CaptureTracking.cpp')
-rw-r--r--llvm/lib/Analysis/CaptureTracking.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/CaptureTracking.cpp b/llvm/lib/Analysis/CaptureTracking.cpp
index 6781dcc..9f27e3d 100644
--- a/llvm/lib/Analysis/CaptureTracking.cpp
+++ b/llvm/lib/Analysis/CaptureTracking.cpp
@@ -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