From 37b6e5ae7dff4e50c1c51b64b3459cbbe6b70daf Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Fri, 24 Feb 2012 09:01:34 +0000 Subject: [PATCH] Workaround a miscompilation by gcc-4.3 that showed up as a failure of the StringRef.Split2 unittest on 32 bit machines. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151358 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/StringRef.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Support/StringRef.cpp b/lib/Support/StringRef.cpp index 0227b9c2190..44e73254035 100644 --- a/lib/Support/StringRef.cpp +++ b/lib/Support/StringRef.cpp @@ -241,7 +241,7 @@ void StringRef::split(SmallVectorImpl &A, ++splits) { std::pair p = rest.split(Separators); - if (p.first.size() != 0 || KeepEmpty) + if (KeepEmpty || p.first.size() != 0) A.push_back(p.first); rest = p.second; }