diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-11-20 19:09:04 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-11-20 19:09:04 +0000 |
commit | 173862e5468fbcf4b022b9088d2c81b25c2d60c5 (patch) | |
tree | 7e5397de7252f267c99878bc8176abc1bfb0fdd2 /lib/Transforms/Utils/InlineFunction.cpp | |
parent | 742e5cf61298e9d7a0672d0cd79708c4939da489 (diff) |
Refactor code to use new attribute getters on CallSite for NoCapture and ByVal.
Suggested in code review by Eli.
That code in InstCombine looks kinda suspicious.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145013 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r-- | lib/Transforms/Utils/InlineFunction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/InlineFunction.cpp b/lib/Transforms/Utils/InlineFunction.cpp index 5464dbc4a8..dd4a659b73 100644 --- a/lib/Transforms/Utils/InlineFunction.cpp +++ b/lib/Transforms/Utils/InlineFunction.cpp @@ -987,7 +987,7 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI) { // by them explicit. However, we don't do this if the callee is readonly // or readnone, because the copy would be unneeded: the callee doesn't // modify the struct. - if (CalledFunc->paramHasAttr(ArgNo+1, Attribute::ByVal)) { + if (CS.isByValArgument(ArgNo)) { ActualArg = HandleByValArgument(ActualArg, TheCall, CalledFunc, IFI, CalledFunc->getParamAlignment(ArgNo+1)); |