From 69d7a91334ce67b50138db6fdf94a48c708f9662 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Fri, 24 Feb 2012 09:01:34 +0000 Subject: Workaround a miscompilation by gcc-4.3 that showed up as a failure of the StringRef.Split2 unittest on 32 bit machines. llvm-svn: 151358 --- llvm/lib/Support/StringRef.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Support/StringRef.cpp') diff --git a/llvm/lib/Support/StringRef.cpp b/llvm/lib/Support/StringRef.cpp index 0227b9c2190..44e73254035 100644 --- a/llvm/lib/Support/StringRef.cpp +++ b/llvm/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; } -- cgit v1.2.3