Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions llvm/include/llvm/ADT/STLExtras.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/STLForwardCompat.h"
#include "llvm/ADT/STLFunctionalExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/iterator.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/Config/abi-breaking.h"
Expand Down Expand Up @@ -2215,13 +2216,12 @@ inline void interleave(const Container &c, UnaryFunctor each_fn,
template <typename Container, typename UnaryFunctor, typename StreamT,
typename T = detail::ValueOfRange<Container>>
inline void interleave(const Container &c, StreamT &os, UnaryFunctor each_fn,
const StringRef &separator) {
StringRef separator) {
interleave(adl_begin(c), adl_end(c), each_fn, [&] { os << separator; });
}
template <typename Container, typename StreamT,
typename T = detail::ValueOfRange<Container>>
inline void interleave(const Container &c, StreamT &os,
const StringRef &separator) {
inline void interleave(const Container &c, StreamT &os, StringRef separator) {
interleave(
c, os, [&](const T &a) { os << a; }, separator);
}
Expand Down
10 changes: 5 additions & 5 deletions llvm/include/llvm/ADT/Twine.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class Twine {
}

/// Construct from a StringRef.
/*implicit*/ Twine(const StringRef &Str) : LHSKind(PtrAndLengthKind) {
/*implicit*/ Twine(StringRef Str) : LHSKind(PtrAndLengthKind) {
LHS.ptrAndLength.ptr = Str.data();
LHS.ptrAndLength.length = Str.size();
assert(isValid() && "Invalid twine!");
Expand Down Expand Up @@ -352,7 +352,7 @@ class Twine {
// right thing. Yet.

/// Construct as the concatenation of a C string and a StringRef.
/*implicit*/ Twine(const char *LHS, const StringRef &RHS)
/*implicit*/ Twine(const char *LHS, StringRef RHS)
: LHSKind(CStringKind), RHSKind(PtrAndLengthKind) {
this->LHS.cString = LHS;
this->RHS.ptrAndLength.ptr = RHS.data();
Expand All @@ -361,7 +361,7 @@ class Twine {
}

/// Construct as the concatenation of a StringRef and a C string.
/*implicit*/ Twine(const StringRef &LHS, const char *RHS)
/*implicit*/ Twine(StringRef LHS, const char *RHS)
: LHSKind(PtrAndLengthKind), RHSKind(CStringKind) {
this->LHS.ptrAndLength.ptr = LHS.data();
this->LHS.ptrAndLength.length = LHS.size();
Expand Down Expand Up @@ -530,14 +530,14 @@ inline Twine operator+(const Twine &LHS, const Twine &RHS) {
/// Additional overload to guarantee simplified codegen; this is equivalent to
/// concat().

inline Twine operator+(const char *LHS, const StringRef &RHS) {
inline Twine operator+(const char *LHS, StringRef RHS) {
return Twine(LHS, RHS);
}

/// Additional overload to guarantee simplified codegen; this is equivalent to
/// concat().

inline Twine operator+(const StringRef &LHS, const char *RHS) {
inline Twine operator+(StringRef LHS, const char *RHS) {
return Twine(LHS, RHS);
}

Expand Down