projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
8f4d5eb
)
Replace explicit loop with utility function.
author
Nick Lewycky
<nicholas@mxc.ca>
Mon, 3 Nov 2008 03:49:14 +0000
(
03:49
+0000)
committer
Nick Lewycky
<nicholas@mxc.ca>
Mon, 3 Nov 2008 03:49:14 +0000
(
03:49
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58593
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/SCCP.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/SCCP.cpp
b/lib/Transforms/Scalar/SCCP.cpp
index 48842b2e38544200517c16f03ec94dd29fa06b60..01b192630d3c0a52b5fad9d544e56a49181563f5 100644
(file)
--- a/
lib/Transforms/Scalar/SCCP.cpp
+++ b/
lib/Transforms/Scalar/SCCP.cpp
@@
-1638,10
+1638,8
@@
static bool AddressIsTaken(GlobalValue *GV) {
} else if (isa<InvokeInst>(*UI) || isa<CallInst>(*UI)) {
// Make sure we are calling the function, not passing the address.
CallSite CS = CallSite::get(cast<Instruction>(*UI));
- for (CallSite::arg_iterator AI = CS.arg_begin(),
- E = CS.arg_end(); AI != E; ++AI)
- if (*AI == GV)
- return true;
+ if (CS.hasArgument(GV))
+ return true;
} else if (LoadInst *LI = dyn_cast<LoadInst>(*UI)) {
if (LI->isVolatile())
return true;