diff options
author | Duncan Sands <baldrick@free.fr> | 2012-02-24 09:01:34 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2012-02-24 09:01:34 +0000 |
commit | 37b6e5ae7dff4e50c1c51b64b3459cbbe6b70daf (patch) | |
tree | 8fa571a5788093da240ef2967812fff603a1196b /lib | |
parent | aaad5f2b9a86982c3bc5198d404a1a8c850521cd (diff) | |
download | external_llvm-37b6e5ae7dff4e50c1c51b64b3459cbbe6b70daf.zip external_llvm-37b6e5ae7dff4e50c1c51b64b3459cbbe6b70daf.tar.gz external_llvm-37b6e5ae7dff4e50c1c51b64b3459cbbe6b70daf.tar.bz2 |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Support/StringRef.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/StringRef.cpp b/lib/Support/StringRef.cpp index 0227b9c..44e7325 100644 --- a/lib/Support/StringRef.cpp +++ b/lib/Support/StringRef.cpp @@ -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; } |