Skip to content
Merged
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: 3 additions & 2 deletions llvm/include/llvm/ADT/StringRef.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ namespace llvm {
StringRef(std::nullptr_t) = delete;

/// Construct a string ref from a cstring.
/*implicit*/ constexpr StringRef(const char *Str)
/*implicit*/ constexpr StringRef(const char *Str LLVM_LIFETIME_BOUND)
: View(Str, Str ?
// GCC 7 doesn't have constexpr char_traits. Fall back to __builtin_strlen.
#if defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE < 8
Expand All @@ -93,7 +93,8 @@ namespace llvm {
}

/// Construct a string ref from a pointer and length.
/*implicit*/ constexpr StringRef(const char *data, size_t length)
/*implicit*/ constexpr StringRef(const char *data LLVM_LIFETIME_BOUND,
size_t length)
: View(data, length) {}

/// Construct a string ref from an std::string.
Expand Down
Loading