From 47b63f23e07229f5ff683edfb2c141bdf17af2c4 Mon Sep 17 00:00:00 2001 From: Martijn Courteaux Date: Thu, 16 Jan 2025 10:49:56 +0100 Subject: [PATCH] Suppress warning on Windows for duplicate constant symbols. --- 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;