diff --git a/src/google/protobuf/port.h b/src/google/protobuf/port.h index 27f19d43a862..182f5786fb79 100644 --- a/src/google/protobuf/port.h +++ b/src/google/protobuf/port.h @@ -64,7 +64,10 @@ inline PROTOBUF_ALWAYS_INLINE void StrongPointer() { template inline PROTOBUF_ALWAYS_INLINE void StrongReferenceToType() { static constexpr auto ptr = T::template GetStrongPointerForType(); - return StrongPointer(); + // This is identical to the implementation of StrongPointer() above, but it + // has to be explicitly inlined here or else Clang 19 will raise an error in + // some configurations. + asm(".reloc ., BFD_RELOC_NONE, %p0" ::"Ws"(ptr)); } #else // .reloc // Portable fallback. It usually generates a single LEA instruction or