summaryrefslogtreecommitdiff
path: root/lib/Analysis/CaptureTracking.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-12-09 18:48:53 +0000
committerDan Gohman <gohman@apple.com>2009-12-09 18:48:53 +0000
commit89452f7386540ca83e8991e74f1d74bbe7271922 (patch)
tree0f0b097657758d059b87caa72fbc87eb1f70d294 /lib/Analysis/CaptureTracking.cpp
parent8a24114b169376901a0b9e804a5aa7eb4416a985 (diff)
downloadllvm-89452f7386540ca83e8991e74f1d74bbe7271922.tar.gz
llvm-89452f7386540ca83e8991e74f1d74bbe7271922.tar.bz2
llvm-89452f7386540ca83e8991e74f1d74bbe7271922.tar.xz
Reuse the Threshold value to size these containers because it's
currently somewhat convenient for them to have the same value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90980 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CaptureTracking.cpp')
-rw-r--r--lib/Analysis/CaptureTracking.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/CaptureTracking.cpp b/lib/Analysis/CaptureTracking.cpp
index 007b282789..10a8b1165d 100644
--- a/lib/Analysis/CaptureTracking.cpp
+++ b/lib/Analysis/CaptureTracking.cpp
@@ -45,8 +45,8 @@ static int const Threshold = 20;
bool llvm::PointerMayBeCaptured(const Value *V,
bool ReturnCaptures, bool StoreCaptures) {
assert(isa<PointerType>(V->getType()) && "Capture is for pointers only!");
- SmallVector<Use*, 20> Worklist;
- SmallSet<Use*, 20> Visited;
+ SmallVector<Use*, Threshold> Worklist;
+ SmallSet<Use*, Threshold> Visited;
int Count = 0;
for (Value::use_const_iterator UI = V->use_begin(), UE = V->use_end();