summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-10-16 05:23:31 +0000
committerBill Wendling <isanbard@gmail.com>2012-10-16 05:23:31 +0000
commitc6a15cf51948ed0f1f738744c489987c78f6ab1a (patch)
tree1113afa332a9a1499ede9dd0864d07ca56f169a3 /llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
parenta517c30ed3515ab8afd6cecb279c83f520f98fad (diff)
downloadbcm5719-llvm-c6a15cf51948ed0f1f738744c489987c78f6ab1a.tar.gz
bcm5719-llvm-c6a15cf51948ed0f1f738744c489987c78f6ab1a.zip
Use the Attributes::get method which takes an AttrVal value directly to simplify the code a bit. No functionality change.
llvm-svn: 166009
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
index 0223d39ab3b..d86c4cbc9f6 100644
--- a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
@@ -348,9 +348,8 @@ struct StrToOpt : public LibCallOptimization {
if (isa<ConstantPointerNull>(EndPtr)) {
// With a null EndPtr, this function won't capture the main argument.
// It would be readonly too, except that it still may write to errno.
- AttrBuilder B;
- B.addAttribute(Attributes::NoCapture);
- CI->addAttribute(1, Attributes::get(Callee->getContext(), B));
+ CI->addAttribute(1, Attributes::get(Callee->getContext(),
+ Attributes::NoCapture));
}
return 0;
OpenPOWER on IntegriCloud