[libc-commits] [libc] 81863dd - [libc] Fix missing static_cast

Guillaume Chatelet via libc-commits libc-commits at lists.llvm.org
Tue Jun 28 02:51:03 PDT 2022


Author: Guillaume Chatelet
Date: 2022-06-28T09:50:54Z
New Revision: 81863dd30372302902ddee396fce84c9a4b6b162

URL: https://github.com/llvm/llvm-project/commit/81863dd30372302902ddee396fce84c9a4b6b162
DIFF: https://github.com/llvm/llvm-project/commit/81863dd30372302902ddee396fce84c9a4b6b162.diff

LOG: [libc] Fix missing static_cast

Added: 
    

Modified: 
    libc/src/string/memory_utils/sized_op.h

Removed: 
    


################################################################################
diff  --git a/libc/src/string/memory_utils/sized_op.h b/libc/src/string/memory_utils/sized_op.h
index d58d39383490c..17b963a36776e 100644
--- a/libc/src/string/memory_utils/sized_op.h
+++ b/libc/src/string/memory_utils/sized_op.h
@@ -112,7 +112,7 @@ template <typename Backend, size_t Size> struct SizedOp {
     if constexpr (LLVM_LIBC_USE_BUILTIN_MEMSET_INLINE &&
                   DstAddrT::TEMPORALITY == Temporality::TEMPORAL) {
       // delegate optimized set to compiler.
-      __builtin_memset_inline(dst.ptr(), value, Size);
+      __builtin_memset_inline(dst.ptr(), static_cast<int>(value), Size);
       return;
     }
     nativeStore(Backend::template splat<type>(value), dst);


        


More information about the libc-commits mailing list