aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ProfileData/InstrProfTest.cpp
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2016-01-29 21:23:47 +0000
committerXinliang David Li <davidxl@google.com>2016-01-29 21:23:47 +0000
commitbf38f39dd69fc5135974b76687f2e704d9d7357a (patch)
treeb73dd5e61d0afeaf2c41a1bb3c838152f0210599 /llvm/unittests/ProfileData/InstrProfTest.cpp
parent631c1ecb64896fe05272d602e9466c8d07c79397 (diff)
downloadllvm-bf38f39dd69fc5135974b76687f2e704d9d7357a.zip
llvm-bf38f39dd69fc5135974b76687f2e704d9d7357a.tar.gz
llvm-bf38f39dd69fc5135974b76687f2e704d9d7357a.tar.bz2
Use range for loop
llvm-svn: 259243
Diffstat (limited to 'llvm/unittests/ProfileData/InstrProfTest.cpp')
-rw-r--r--llvm/unittests/ProfileData/InstrProfTest.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/unittests/ProfileData/InstrProfTest.cpp b/llvm/unittests/ProfileData/InstrProfTest.cpp
index ddf13de..f2a3bce 100644
--- a/llvm/unittests/ProfileData/InstrProfTest.cpp
+++ b/llvm/unittests/ProfileData/InstrProfTest.cpp
@@ -755,18 +755,16 @@ TEST_F(InstrProfTest, instr_prof_symtab_compression_test) {
FuncNames2.push_back(OS.str());
}
- for (int DoCompression = 0; DoCompression < 2; DoCompression++) {
+ for (bool DoCompression : {false, true}) {
// Compressing:
std::string FuncNameStrings1;
- collectPGOFuncNameStrings(FuncNames1,
- (DoCompression != 0 && zlib::isAvailable()),
- FuncNameStrings1);
+ collectPGOFuncNameStrings(
+ FuncNames1, (DoCompression && zlib::isAvailable()), FuncNameStrings1);
// Compressing:
std::string FuncNameStrings2;
- collectPGOFuncNameStrings(FuncNames2,
- (DoCompression != 0 && zlib::isAvailable()),
- FuncNameStrings2);
+ collectPGOFuncNameStrings(
+ FuncNames2, (DoCompression && zlib::isAvailable()), FuncNameStrings2);
for (int Padding = 0; Padding < 3; Padding++) {
// Join with paddings: