Skip to content

Commit f6c7f8e

Browse files
committed
Undo STLExtras
1 parent 067e30d commit f6c7f8e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/include/llvm/ADT/STLExtras.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include "llvm/ADT/Hashing.h"
2222
#include "llvm/ADT/STLForwardCompat.h"
2323
#include "llvm/ADT/STLFunctionalExtras.h"
24-
#include "llvm/ADT/StringRef.h"
2524
#include "llvm/ADT/iterator.h"
2625
#include "llvm/ADT/iterator_range.h"
2726
#include "llvm/Config/abi-breaking.h"
@@ -2216,12 +2215,13 @@ inline void interleave(const Container &c, UnaryFunctor each_fn,
22162215
template <typename Container, typename UnaryFunctor, typename StreamT,
22172216
typename T = detail::ValueOfRange<Container>>
22182217
inline void interleave(const Container &c, StreamT &os, UnaryFunctor each_fn,
2219-
StringRef separator) {
2218+
const StringRef &separator) {
22202219
interleave(adl_begin(c), adl_end(c), each_fn, [&] { os << separator; });
22212220
}
22222221
template <typename Container, typename StreamT,
22232222
typename T = detail::ValueOfRange<Container>>
2224-
inline void interleave(const Container &c, StreamT &os, StringRef separator) {
2223+
inline void interleave(const Container &c, StreamT &os,
2224+
const StringRef &separator) {
22252225
interleave(
22262226
c, os, [&](const T &a) { os << a; }, separator);
22272227
}

0 commit comments

Comments
 (0)