Skip to content

Commit

Permalink
Fix codegen trunks in absl/hash/hash_benchmark.cc.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 588121665
Change-Id: Id057772e426aefe2fe7b2f1e94fd405b97167fed
  • Loading branch information
nafi3000 authored and copybara-github committed Dec 5, 2023
1 parent f845e60 commit 71d553b
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions absl/hash/hash_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ struct TypeErasedAbslHash {
}
};

template <typename FuncType>
inline FuncType* ODRUseFunction(FuncType* ptr) {
volatile FuncType* dummy = ptr;
return dummy;
}

absl::Cord FlatCord(size_t size) {
absl::Cord result(std::string(size, 'a'));
result.Flatten();
Expand Down Expand Up @@ -166,7 +160,7 @@ absl::flat_hash_set<T> FlatHashSet(size_t count) {
return hash<decltype(__VA_ARGS__)>{}(arg); \
} \
bool absl_hash_test_odr_use##hash##name = \
ODRUseFunction(&Codegen##hash##name);
(benchmark::DoNotOptimize(&Codegen##hash##name), false);

MAKE_BENCHMARK(AbslHash, Int32, int32_t{});
MAKE_BENCHMARK(AbslHash, Int64, int64_t{});
Expand Down

0 comments on commit 71d553b

Please sign in to comment.