summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
index 6df0ee23223..e751750986f 100644
--- a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
@@ -350,7 +350,7 @@ struct StrToOpt : public LibCallOptimization {
// It would be readonly too, except that it still may write to errno.
Attributes::Builder B;
B.addAttribute(Attributes::NoCapture);
- CI->addAttribute(1, Attributes::get(B));
+ CI->addAttribute(1, Attributes::get(Callee->getContext(), B));
}
return 0;
OpenPOWER on IntegriCloud