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
diff --git a/llvm/lib/Support/StringRef.cpp b/llvm/lib/Support/StringRef.cpp
index 0227b9c..44e7325 100644
--- a/llvm/lib/Support/StringRef.cpp
+++ b/llvm/lib/Support/StringRef.cpp
@@ -241,7 +241,7 @@
++splits) {
std::pair<StringRef, StringRef> p = rest.split(Separators);
- if (p.first.size() != 0 || KeepEmpty)
+ if (KeepEmpty || p.first.size() != 0)
A.push_back(p.first);
rest = p.second;
}