Skip to content

Commit

Permalink
Suppress warning on Windows for duplicate constant symbols. (#8555)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcourteaux authored Jan 17, 2025
1 parent 59f4fff commit bf65d52
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/LLVM_Output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bf65d52

Please sign in to comment.