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 | 612d70b19d3f46bf293daa2952127ba8bcb1edf6 (patch) | |
tree | 57d064afd1671f449fb10a2dc155bfa61a102cbf /llvm/lib/Transforms/Utils/InlineFunction.cpp | |
parent | 8ad31c2e360411db9035fa502817f8ca63b99893 (diff) | |
download | llvm-612d70b19d3f46bf293daa2952127ba8bcb1edf6.zip llvm-612d70b19d3f46bf293daa2952127ba8bcb1edf6.tar.gz llvm-612d70b19d3f46bf293daa2952127ba8bcb1edf6.tar.bz2 |
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.
llvm-svn: 145013
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index 5464dbc..dd4a659 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/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)); |