[libc-commits] [libc] 408c0cc - [libc] Fix wrong type for load/store of Repeated elements
Guillaume Chatelet via libc-commits
libc-commits at lists.llvm.org
Wed Nov 24 06:13:23 PST 2021
Author: Guillaume Chatelet
Date: 2021-11-24T14:13:13Z
New Revision: 408c0cc4eb6099d06cbd51fd4e205c2b39b2c8af
URL: https://github.com/llvm/llvm-project/commit/408c0cc4eb6099d06cbd51fd4e205c2b39b2c8af
DIFF: https://github.com/llvm/llvm-project/commit/408c0cc4eb6099d06cbd51fd4e205c2b39b2c8af.diff
LOG: [libc] Fix wrong type for load/store of Repeated elements
Added:
Modified:
libc/src/string/memory_utils/elements.h
Removed:
################################################################################
diff --git a/libc/src/string/memory_utils/elements.h b/libc/src/string/memory_utils/elements.h
index ff47f61c7902d..f99e03d9d47b6 100644
--- a/libc/src/string/memory_utils/elements.h
+++ b/libc/src/string/memory_utils/elements.h
@@ -129,13 +129,13 @@ template <typename Element, size_t ElementCount> struct Repeated {
}
}
- static Storage<Element> Load(const char *ptr) {
- Storage<Element> value;
+ static Storage<Repeated> Load(const char *ptr) {
+ Storage<Repeated> value;
Copy(reinterpret_cast<char *>(&value), ptr);
return value;
}
- static void Store(char *ptr, Storage<Element> value) {
+ static void Store(char *ptr, Storage<Repeated> value) {
Copy(ptr, reinterpret_cast<const char *>(&value));
}
};
More information about the libc-commits
mailing list