OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b83012a
)
Comparing a pointer with null is not a capture.
author
Dan Gohman
<gohman@apple.com>
Thu, 19 Nov 2009 21:34:07 +0000
(21:34 +0000)
committer
Dan Gohman
<gohman@apple.com>
Thu, 19 Nov 2009 21:34:07 +0000
(21:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89389
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Analysis/CaptureTracking.cpp
patch
|
blob
|
history
diff --git
a/lib/Analysis/CaptureTracking.cpp
b/lib/Analysis/CaptureTracking.cpp
index
f615881
..
7cd055d
100644
(file)
--- a/
lib/Analysis/CaptureTracking.cpp
+++ b/
lib/Analysis/CaptureTracking.cpp
@@
-98,6
+98,11
@@
bool llvm::PointerMayBeCaptured(const Value *V, bool ReturnCaptures) {
Worklist.push_back(U);
}
break;
+ case Instruction::ICmp:
+ // Comparing the pointer against null does not count as a capture.
+ if (isa<ConstantPointerNull>(I->getOperand(1)))
+ break;
+ return true;
default:
// Something else - be conservative and say it is captured.
return true;