Skip to content

Commit

Permalink
Workaround a miscompilation by gcc-4.3 that showed up as a failure
Browse files Browse the repository at this point in the history
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
  • Loading branch information
CunningBaldrick committed Feb 24, 2012
1 parent aaad5f2 commit 37b6e5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Support/StringRef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ void StringRef::split(SmallVectorImpl<StringRef> &A,
++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;
}
Expand Down

0 comments on commit 37b6e5a

Please sign in to comment.