Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions clang/include/clang/Basic/Module.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ struct ASTFileSignature : std::array<uint8_t, 20> {

explicit operator bool() const { return *this != BaseT({{0}}); }

// Support implicit cast to ArrayRef. Note that ASTFileSignature::size
// prevents implicit cast to ArrayRef because one of the implicit constructors
// of ArrayRef requires access to BaseT::size.
operator ArrayRef<uint8_t>() const { return ArrayRef<uint8_t>(data(), size); }

/// Returns the value truncated to the size of an uint64_t.
uint64_t truncatedValue() const {
uint64_t Value = 0;
Expand Down
5 changes: 0 additions & 5 deletions llvm/include/llvm/ADT/ArrayRef.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,6 @@ namespace llvm {
/*implicit*/ constexpr ArrayRef(const C &V)
: Data(V.data()), Length(V.size()) {}

/// Construct an ArrayRef from a std::array
template <size_t N>
/*implicit*/ constexpr ArrayRef(const std::array<T, N> &Arr)
: Data(Arr.data()), Length(N) {}

/// Construct an ArrayRef from a C array.
template <size_t N>
/*implicit*/ constexpr ArrayRef(const T (&Arr LLVM_LIFETIME_BOUND)[N])
Expand Down