summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
diff options
context:
space:
mode:
authorDavid Bolvansky <david.bolvansky@gmail.com>2019-09-17 10:03:45 +0000
committerDavid Bolvansky <david.bolvansky@gmail.com>2019-09-17 10:03:45 +0000
commit3a3dddd9d72edecc774efaee153e876fe74fed6c (patch)
treef811d80859bab9c3488825d08ecad6bdee92dd60 /llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
parent83517637095060bc045a879caeecd2f2d8ea0e1f (diff)
downloadbcm5719-llvm-3a3dddd9d72edecc774efaee153e876fe74fed6c.tar.gz
bcm5719-llvm-3a3dddd9d72edecc774efaee153e876fe74fed6c.zip
[NFCI] Fixed buildbots
llvm-svn: 372097
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
index 526988d6d89..217f929e9ad 100644
--- a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
@@ -610,10 +610,7 @@ Value *LibCallSimplifier::optimizeStrNCpy(CallInst *CI, IRBuilder<> &B) {
if (SrcLen == 0) {
// strncpy(x, "", y) -> memset(align 1 x, '\0', y)
- CallInst *NewCI = B.CreateMemSet(Dst, B.getInt8('\0'), Size, 1);
- AttrBuilder ArgAttrs(CI->getAttributes().getParamAttributes(0));
- NewCI->setAttributes(NewCI->getAttributes().addParamAttributes(
- CI->getContext(), 0, ArgAttrs));
+ B.CreateMemSet(Dst, B.getInt8('\0'), Size, 1);
return Dst;
}
@@ -624,8 +621,6 @@ Value *LibCallSimplifier::optimizeStrNCpy(CallInst *CI, IRBuilder<> &B) {
Type *PT = Callee->getFunctionType()->getParamType(0);
// strncpy(x, s, c) -> memcpy(align 1 x, align 1 s, c) [s and c are constant]
CallInst *NewCI = B.CreateMemCpy(Dst, 1, Src, 1, ConstantInt::get(DL.getIntPtrType(PT), Len));
- // AttrBuilder ArgAttrs(CI->getAttributes().getParamAttributes(0));
-// NewCI->getAttributes().addParamAttributes(CI->getContext(), 0, ArgAttrs);
NewCI->setAttributes(CI->getAttributes());
return Dst;
}
OpenPOWER on IntegriCloud