From bf65d521d69d75c0ffa9459cdf797886b1bc77e2 Mon Sep 17 00:00:00 2001 From: Martijn Courteaux Date: Fri, 17 Jan 2025 01:03:01 +0100 Subject: [PATCH] Suppress warning on Windows for duplicate constant symbols. (#8555) --- src/LLVM_Output.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/LLVM_Output.cpp b/src/LLVM_Output.cpp index f33dc6f303ed..7ea6ec635793 100644 --- a/src/LLVM_Output.cpp +++ b/src/LLVM_Output.cpp @@ -185,7 +185,14 @@ void write_symbol_table(std::ostream &out, internal_assert(!err); std::string name = symbols.str().str(); if (name_to_member_index.find(name) != name_to_member_index.end()) { - user_warning << "Warning: symbol '" << name << "' seen multiple times in library.\n"; + bool is_constant = false; + is_constant |= name.find("__real@") == 0; + is_constant |= name.find("__xmm@") == 0; + is_constant |= name.find("__ymm@") == 0; + is_constant |= name.find("__zmm@") == 0; + if (!is_constant) { + user_warning << "Warning: symbol '" << name << "' seen multiple times in library.\n"; + } continue; } name_to_member_index[name] = i;