[compiler-rt] 0706a53 - [NFC][sanitizer] Change ArrayRef constructor
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue May 30 22:44:53 PDT 2023
Author: Vitaly Buka
Date: 2023-05-30T22:44:39-07:00
New Revision: 0706a53a1b02a70ac3ab163a29c5a3ab5b4f18e8
URL: https://github.com/llvm/llvm-project/commit/0706a53a1b02a70ac3ab163a29c5a3ab5b4f18e8
DIFF: https://github.com/llvm/llvm-project/commit/0706a53a1b02a70ac3ab163a29c5a3ab5b4f18e8.diff
LOG: [NFC][sanitizer] Change ArrayRef constructor
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_common.h
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common.h b/compiler-rt/lib/sanitizer_common/sanitizer_common.h
index d43e066ca1b9..358878e81c94 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_common.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_common.h
@@ -1086,7 +1086,7 @@ class ArrayRef {
ArrayRef(T *begin, T *end) : begin_(begin), end_(end) {}
template <typename C>
- ArrayRef(const C &src) : begin_(src.begin()), end_(src.end()) {}
+ ArrayRef(const C &src) : begin_(src.data()), end_(src.data() + src.size()) {}
const T *begin() const { return begin_; }
const T *end() const { return end_; }
More information about the llvm-commits
mailing list