summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/StringRef.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2012-02-24 09:01:34 +0000
committerDuncan Sands <baldrick@free.fr>2012-02-24 09:01:34 +0000
commit69d7a91334ce67b50138db6fdf94a48c708f9662 (patch)
tree847d2d0b87a3df6785860af11b7d2265867325cd /llvm/lib/Support/StringRef.cpp
parente51b944fd7605d226204a3dd3a93b1f84c56cea2 (diff)
downloadbcm5719-llvm-69d7a91334ce67b50138db6fdf94a48c708f9662.tar.gz
bcm5719-llvm-69d7a91334ce67b50138db6fdf94a48c708f9662.zip
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
Diffstat (limited to 'llvm/lib/Support/StringRef.cpp')
-rw-r--r--llvm/lib/Support/StringRef.cpp2
1 files changed, 1 insertions, 1 deletions
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<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;
}
OpenPOWER on IntegriCloud