summaryrefslogtreecommitdiff
path: root/lib/Support/Triple.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-02-21 09:29:14 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-02-21 09:29:14 +0000
commitc5f18d34c37e947fcda67cf160f2307f5de8e7e8 (patch)
tree7e1fa8ee7af95dae2101ee59f8025770e81c21f1 /lib/Support/Triple.cpp
parent6b842e35dcd7faf2b05b2ef9b1892c29050f3607 (diff)
downloadllvm-c5f18d34c37e947fcda67cf160f2307f5de8e7e8.tar.gz
llvm-c5f18d34c37e947fcda67cf160f2307f5de8e7e8.tar.bz2
llvm-c5f18d34c37e947fcda67cf160f2307f5de8e7e8.tar.xz
Tiny cosmetic change to use the same style for all of the while loops in
the normalize routine, especially the empty while loops. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151050 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Triple.cpp')
-rw-r--r--lib/Support/Triple.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp
index 72f3131451..ae69c60731 100644
--- a/lib/Support/Triple.cpp
+++ b/lib/Support/Triple.cpp
@@ -414,7 +414,8 @@ std::string Triple::normalize(StringRef Str) {
// components to the right.
for (unsigned i = Pos; !CurrentComponent.empty(); ++i) {
// Skip over any fixed components.
- while (i < array_lengthof(Found) && Found[i]) ++i;
+ while (i < array_lengthof(Found) && Found[i])
+ ++i;
// Place the component at the new position, getting the component
// that was at this position - it will be moved right.
std::swap(CurrentComponent, Components[i]);
@@ -442,7 +443,8 @@ std::string Triple::normalize(StringRef Str) {
Components.push_back(CurrentComponent);
// Advance Idx to the component's new position.
- while (++Idx < array_lengthof(Found) && Found[Idx]) {}
+ while (++Idx < array_lengthof(Found) && Found[Idx])
+ ;
} while (Idx < Pos); // Add more until the final position is reached.
}
assert(Pos < Components.size() && Components[Pos] == Comp &&