[compiler-rt] c42e555 - [NFC][sanitizer] Delegate ArrayRef constructors
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 2 14:32:17 PDT 2023
Author: Vitaly Buka
Date: 2023-06-02T14:32:03-07:00
New Revision: c42e555dc2b2df45027df62a28314446802cd8b7
URL: https://github.com/llvm/llvm-project/commit/c42e555dc2b2df45027df62a28314446802cd8b7
DIFF: https://github.com/llvm/llvm-project/commit/c42e555dc2b2df45027df62a28314446802cd8b7.diff
LOG: [NFC][sanitizer] Delegate ArrayRef constructors
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 358878e81c948..302b4437d64bd 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_common.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_common.h
@@ -1083,10 +1083,10 @@ template <typename T>
class ArrayRef {
public:
ArrayRef() {}
- ArrayRef(T *begin, T *end) : begin_(begin), end_(end) {}
+ ArrayRef(const T *begin, const T *end) : begin_(begin), end_(end) {}
template <typename C>
- ArrayRef(const C &src) : begin_(src.data()), end_(src.data() + src.size()) {}
+ ArrayRef(const C &src) : ArrayRef(src.data(), src.data() + src.size()) {}
const T *begin() const { return begin_; }
const T *end() const { return end_; }
More information about the llvm-commits
mailing list