From c30a38f34bdfecb99ce49e3ffa479039c9bf0209 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 21 Jul 2011 06:21:31 +0000 Subject: move tier out of an anonymous namespace, it doesn't make sense to for it to be an an anon namespace and be in a header. Eliminate some extraenous uses of tie. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135669 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/StringExtras.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/Support') diff --git a/lib/Support/StringExtras.cpp b/lib/Support/StringExtras.cpp index eb2fa08..49c5ac4 100644 --- a/lib/Support/StringExtras.cpp +++ b/lib/Support/StringExtras.cpp @@ -51,11 +51,10 @@ std::pair llvm::getToken(StringRef Source, void llvm::SplitString(StringRef Source, SmallVectorImpl &OutFragments, StringRef Delimiters) { - StringRef S2, S; - tie(S2, S) = getToken(Source, Delimiters); - while (!S2.empty()) { - OutFragments.push_back(S2); - tie(S2, S) = getToken(S, Delimiters); + std::pair S = getToken(Source, Delimiters); + while (!S.first.empty()) { + OutFragments.push_back(S.first); + S = getToken(S.second, Delimiters); } } -- cgit v1.1