[llvm] r372097 - [NFCI] Fixed buildbots

David Bolvansky via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 17 03:03:46 PDT 2019


Author: xbolva00
Date: Tue Sep 17 03:03:45 2019
New Revision: 372097

URL: http://llvm.org/viewvc/llvm-project?rev=372097&view=rev
Log:
[NFCI] Fixed buildbots

Modified:
    llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp

Modified: llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp?rev=372097&r1=372096&r2=372097&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp Tue Sep 17 03:03:45 2019
@@ -610,10 +610,7 @@ Value *LibCallSimplifier::optimizeStrNCp
 
   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::optimizeStrNCp
   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;
 }




More information about the llvm-commits mailing list