diff options
author | Xinliang David Li <davidxl@google.com> | 2016-01-29 21:23:47 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@google.com> | 2016-01-29 21:23:47 +0000 |
commit | bf38f39dd69fc5135974b76687f2e704d9d7357a (patch) | |
tree | b73dd5e61d0afeaf2c41a1bb3c838152f0210599 /llvm/unittests/ProfileData/InstrProfTest.cpp | |
parent | 631c1ecb64896fe05272d602e9466c8d07c79397 (diff) | |
download | llvm-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.cpp | 12 |
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: |