Define non-temporal store debug hooks as inline no-ops in NDEBUG builds.

Clang recently introduced an `x86-fence-nontemporal-stores` pass which emits an sfence before external calls. Before this, since in NDEBUG builds,  DebugReportNonTemporalStore had an empty definition, there was no overhead, but with this pass, even though it's empty, an sfence is emmitted after every non-temporal store, which slows down performance more than 30x. Explicitly marking them as inline avoids the problem, since the calling function emits an sfence at the end explicitly already.

PiperOrigin-RevId: 1015839543
diff --git a/absl/crc/internal/crc.cc b/absl/crc/internal/crc.cc
index 6041c43..1d26628 100644
--- a/absl/crc/internal/crc.cc
+++ b/absl/crc/internal/crc.cc
@@ -440,14 +440,9 @@
 }
 
 #ifndef NDEBUG
-ABSL_ATTRIBUTE_WEAK
+ABSL_ATTRIBUTE_WEAK void DebugReportNonTemporalStore() {}
+ABSL_ATTRIBUTE_WEAK void DebugReportStoreFence() {}
 #endif
-void DebugReportNonTemporalStore() {}
-
-#ifndef NDEBUG
-ABSL_ATTRIBUTE_WEAK
-#endif
-void DebugReportStoreFence() {}
 
 }  // namespace crc_internal
 ABSL_NAMESPACE_END
diff --git a/absl/crc/internal/crc.h b/absl/crc/internal/crc.h
index 5f9306c..d2fb11b 100644
--- a/absl/crc/internal/crc.h
+++ b/absl/crc/internal/crc.h
@@ -85,8 +85,21 @@
 };
 // Bookkeeping hooks called by non-temporal store functions and
 // NonTemporalStoreFence(), for use in tests.
+//
+// In debug builds (!defined(NDEBUG)), these are declared out-of-line and
+// defined as weak symbols in crc.cc so crc_memcpy_test.cc can override them to
+// verify non-temporal store fencing. In optimized builds (NDEBUG), they must be
+// defined inline here so the compiler eliminates the call within the same
+// translation unit without needing LTO; otherwise, an external call following a
+// non-temporal store causes the compiler's x86-fence-nontemporal-stores pass to
+// insert an sfence after every store.
+#ifndef NDEBUG
 void DebugReportNonTemporalStore();
 void DebugReportStoreFence();
+#else
+inline void DebugReportNonTemporalStore() {}
+inline void DebugReportStoreFence() {}
+#endif
 
 }  // namespace crc_internal
 ABSL_NAMESPACE_END