[PATCH] D79601: [examples] Fix llvm.memset prototype in BrainF example.

James Y Knight via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 10 14:22:50 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG6d23f2985270: [examples] Fix llvm.memset prototype in BrainF example. (authored by ricky, committed by jyknight).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79601/new/

https://reviews.llvm.org/D79601

Files:
  llvm/examples/BrainF/BrainF.cpp


Index: llvm/examples/BrainF/BrainF.cpp
===================================================================
--- llvm/examples/BrainF/BrainF.cpp
+++ llvm/examples/BrainF/BrainF.cpp
@@ -66,7 +66,7 @@
 
   //Function prototypes
 
-  //declare void @llvm.memset.p0i8.i32(i8 *, i8, i32, i32, i1)
+  //declare void @llvm.memset.p0i8.i32(i8 *, i8, i32, i1)
   Type *Tys[] = { Type::getInt8PtrTy(C), Type::getInt32Ty(C) };
   Function *memset_func = Intrinsic::getDeclaration(module, Intrinsic::memset,
                                                     Tys);
@@ -98,13 +98,12 @@
                                    nullptr, "arr");
   BB->getInstList().push_back(cast<Instruction>(ptr_arr));
 
-  //call void @llvm.memset.p0i8.i32(i8 *%arr, i8 0, i32 %d, i32 1, i1 0)
+  //call void @llvm.memset.p0i8.i32(i8 *%arr, i8 0, i32 %d, i1 0)
   {
     Value *memset_params[] = {
       ptr_arr,
       ConstantInt::get(C, APInt(8, 0)),
       val_mem,
-      ConstantInt::get(C, APInt(32, 1)),
       ConstantInt::get(C, APInt(1, 0))
     };
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79601.263083.patch
Type: text/x-patch
Size: 1031 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200510/1add22f3/attachment.bin>


More information about the llvm-commits mailing list