diff options
author | Duncan Sands <baldrick@free.fr> | 2008-01-25 22:06:51 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-01-25 22:06:51 +0000 |
commit | 255bd2852b7e23591fc66434a4a10ecf5bf4a615 (patch) | |
tree | 6f0ae677262991f742d59669c4a2338b071c2319 /lib/Transforms/Utils/InlineFunction.cpp | |
parent | 88d480b552bef3a89762a28e06abf823ac6707c0 (diff) |
Do this more neatly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46369 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r-- | lib/Transforms/Utils/InlineFunction.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/InlineFunction.cpp b/lib/Transforms/Utils/InlineFunction.cpp index f730d534a5..552583042a 100644 --- a/lib/Transforms/Utils/InlineFunction.cpp +++ b/lib/Transforms/Utils/InlineFunction.cpp @@ -245,8 +245,7 @@ bool llvm::InlineFunction(CallSite CS, CallGraph *CG, const TargetData *TD) { // or readnone, because the copy would be unneeded: the callee doesn't // modify the struct. if (CalledFunc->paramHasAttr(ArgNo+1, ParamAttr::ByVal) && - !CalledFunc->paramHasAttr(0, ParamAttr::ReadOnly) && - !CalledFunc->paramHasAttr(0, ParamAttr::ReadNone)) { + !CalledFunc->onlyReadsMemory()) { const Type *AggTy = cast<PointerType>(I->getType())->getElementType(); const Type *VoidPtrTy = PointerType::getUnqual(Type::Int8Ty); |