From 69285168c9c009d2a760167ea79060cc84fdea9d Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 24 Apr 2024 14:28:41 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF-8?q?l=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Created using spr 1.3.5-bogner --- llvm/tools/gold/gold-plugin.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp index b8a33f74bd570..b8431334f8487 100644 --- a/llvm/tools/gold/gold-plugin.cpp +++ b/llvm/tools/gold/gold-plugin.cpp @@ -434,8 +434,14 @@ ld_plugin_status onload(ld_plugin_tv *tv) { // FIXME: When binutils 2.31 (containing gold 1.16) is the minimum // required version, this should be changed to: // get_wrap_symbols = tv->tv_u.tv_get_wrap_symbols; - get_wrap_symbols = - (ld_plugin_get_wrap_symbols)tv->tv_u.tv_message; +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wcast-function-type" +#endif + get_wrap_symbols = (ld_plugin_get_wrap_symbols)tv->tv_u.tv_message; +#ifdef __clang__ +#pragma clang diagnostic pop +#endif break; default: break;