1
0
mirror of https://github.com/google/benchmark.git synced 2025-04-17 23:12:30 +08:00

added hack to avoid Link time optimization

This commit is contained in:
Tiago Freire 2024-03-05 19:59:33 +01:00
parent 1576991177
commit 675d242857
No known key found for this signature in database
GPG Key ID: 67C8701B75172B17

View File

@ -152,8 +152,12 @@ BENCHMARK_EXPORT std::map<std::string, std::string>*& GetGlobalContext() {
return global_context;
}
// FIXME: wouldn't LTO mess this up?
void UseCharPointer(char const volatile*) {}
void const volatile* volatile g_LTO_dump;
// FIXME: Verify if LTO still messes this up?
void UseCharPointer(char const volatile* const v) {
g_LTO_dump = reinterpret_cast<void const volatile*>(v);
}
} // namespace internal