]> granicus.if.org Git - llvm/commitdiff
[NFCI] Fixed buildbots
authorDavid Bolvansky <david.bolvansky@gmail.com>
Tue, 17 Sep 2019 10:03:45 +0000 (10:03 +0000)
committerDavid Bolvansky <david.bolvansky@gmail.com>
Tue, 17 Sep 2019 10:03:45 +0000 (10:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372097 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/SimplifyLibCalls.cpp

index 526988d6d89842d561d76106b7e4cd8617026cea..217f929e9ad89480110eb0b0e97b92aaa41feffa 100644 (file)
@@ -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;
 }