[libcxx-commits] [libcxx] a2afc82 - [libc++] Fix benchmark failure

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jan 24 09:05:17 PST 2022


Author: Louis Dionne
Date: 2022-01-24T12:05:09-05:00
New Revision: a2afc8249a9950da861bce5fd724c1ccf6c4eea4

URL: https://github.com/llvm/llvm-project/commit/a2afc8249a9950da861bce5fd724c1ccf6c4eea4
DIFF: https://github.com/llvm/llvm-project/commit/a2afc8249a9950da861bce5fd724c1ccf6c4eea4.diff

LOG: [libc++] Fix benchmark failure

Added: 
    

Modified: 
    libcxx/benchmarks/filesystem.bench.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/benchmarks/filesystem.bench.cpp b/libcxx/benchmarks/filesystem.bench.cpp
index 95aecd50473fd..4fe4fc503ca13 100644
--- a/libcxx/benchmarks/filesystem.bench.cpp
+++ b/libcxx/benchmarks/filesystem.bench.cpp
@@ -83,7 +83,7 @@ void BM_PathIterateMultipleTimes(benchmark::State &st, GenInputs gen) {
     PP /= Part;
   benchmark::DoNotOptimize(PP.native().data());
   while (st.KeepRunning()) {
-    for (auto &E : PP) {
+    for (auto const& E : PP) {
       benchmark::DoNotOptimize(E.native().data());
     }
     benchmark::ClobberMemory();
@@ -104,7 +104,7 @@ void BM_PathIterateOnce(benchmark::State &st, GenInputs gen) {
   benchmark::DoNotOptimize(PP.native().data());
   while (st.KeepRunning()) {
     const path P = PP.native();
-    for (auto &E : P) {
+    for (auto const& E : P) {
       benchmark::DoNotOptimize(E.native().data());
     }
     benchmark::ClobberMemory();


        


More information about the libcxx-commits mailing list