diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-07-28 22:50:26 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-07-28 22:50:26 +0000 |
commit | 7d3056b16038a6a09c452c0dfcc3c8f4e421506a (patch) | |
tree | ecfdaa7cb750280156bb14f128e9cd08aad7c17b /lib/Transforms/IPO/FunctionAttrs.cpp | |
parent | 826c148aa5af36cca688b7da447bc0b22905d904 (diff) |
simplify by using CallSite constructors; virtually eliminates CallSite::get from the tree
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109687 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/FunctionAttrs.cpp')
-rw-r--r-- | lib/Transforms/IPO/FunctionAttrs.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/FunctionAttrs.cpp b/lib/Transforms/IPO/FunctionAttrs.cpp index 030fe6e219..0bf150e6e3 100644 --- a/lib/Transforms/IPO/FunctionAttrs.cpp +++ b/lib/Transforms/IPO/FunctionAttrs.cpp @@ -162,8 +162,8 @@ bool FunctionAttrs::AddReadAttrs(const CallGraphSCC &SCC) { // Some instructions can be ignored even if they read or write memory. // Detect these now, skipping to the next instruction if one is found. - CallSite CS = CallSite::get(I); - if (CS.getInstruction() && CS.getCalledFunction()) { + CallSite CS(cast<Value>(I)); + if (CS && CS.getCalledFunction()) { // Ignore calls to functions in the same SCC. if (SCCNodes.count(CS.getCalledFunction())) continue; |