Modify {Call,Invoke}Inst::addAttribute to take an AttrKind.
llvm-svn: 176397
diff --git a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
index 9b39bf4..8ff87ee 100644
--- a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
@@ -798,8 +798,7 @@
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.
- CI->addAttribute(1, Attribute::get(Callee->getContext(),
- Attribute::NoCapture));
+ CI->addAttribute(1, Attribute::NoCapture);
}
return 0;