diff options
Diffstat (limited to 'absl/base/internal/atomic_hook_test.cc')
-rw-r--r-- | absl/base/internal/atomic_hook_test.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/absl/base/internal/atomic_hook_test.cc b/absl/base/internal/atomic_hook_test.cc index 794072ee2fc2..e577a8fd930b 100644 --- a/absl/base/internal/atomic_hook_test.cc +++ b/absl/base/internal/atomic_hook_test.cc @@ -27,7 +27,9 @@ int value = 0; void TestHook(int x) { value = x; } TEST(AtomicHookTest, NoDefaultFunction) { - ABSL_CONST_INIT static absl::base_internal::AtomicHook<void(*)(int)> hook; + ABSL_INTERNAL_ATOMIC_HOOK_ATTRIBUTES static absl::base_internal::AtomicHook< + void (*)(int)> + hook; value = 0; // Test the default DummyFunction. @@ -53,8 +55,9 @@ TEST(AtomicHookTest, NoDefaultFunction) { TEST(AtomicHookTest, WithDefaultFunction) { // Set the default value to TestHook at compile-time. - ABSL_CONST_INIT static absl::base_internal::AtomicHook<void (*)(int)> hook( - TestHook); + ABSL_INTERNAL_ATOMIC_HOOK_ATTRIBUTES static absl::base_internal::AtomicHook< + void (*)(int)> + hook(TestHook); value = 0; // Test the default value is TestHook. |