summaryrefslogtreecommitdiff
path: root/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
commit46d5dd9b058f31637f2449b2925f13a5707d126d (patch)
tree89dd5bb9b5733ce3f606c74c45a9fa35ace97bee /lib/Transforms/Scalar/SimplifyLibCalls.cpp
parent76b67df11e5cdb87e954a0ad7d1cd7fd4a502be1 (diff)
downloadllvm-46d5dd9b058f31637f2449b2925f13a5707d126d.tar.gz
llvm-46d5dd9b058f31637f2449b2925f13a5707d126d.tar.bz2
llvm-46d5dd9b058f31637f2449b2925f13a5707d126d.tar.xz
Use the Attributes::get method which takes an AttrVal value directly to simplify the code a bit. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166009 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/SimplifyLibCalls.cpp')
-rw-r--r--lib/Transforms/Scalar/SimplifyLibCalls.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/SimplifyLibCalls.cpp b/lib/Transforms/Scalar/SimplifyLibCalls.cpp
index 0223d39ab3..d86c4cbc9f 100644
--- a/lib/Transforms/Scalar/SimplifyLibCalls.cpp
+++ b/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;