From: Duncan Sands Date: Fri, 24 Feb 2012 09:01:34 +0000 (+0000) Subject: Workaround a miscompilation by gcc-4.3 that showed up as a failure X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=37b6e5ae7dff4e50c1c51b64b3459cbbe6b70daf;p=oota-llvm.git 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 --- 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; }