Live Coding warnings after VS Community 2019 update to version 16.10.1

Just had some fun building a new custom engine build from 4.27.2 and the things to change to get rid of the _volmd found in COFF warnings changed a little bit.

Epic migrated some of the changes from the UE5 engine to UE4 so the thing missing is to wrap

									if (!string::StartsWith(symbolName.c_str(), "$unwind$??__F") &&
										!string::StartsWith(symbolName.c_str(), "$pdata$??__F"))
									{
										LC_WARNING_USER("Non-unique symbol %s found in COFF file %s. Do not change the order of these variables while live coding, or consider upgrading to a newer compiler (VS 2015 or later)",
											symbolName.c_str(), file->filename.c_str());
									}
									else
									{
										LC_LOG_USER("Non-unique at-exit symbol %s found in COFF file %s. These sometimes appear in debug builds",
											symbolName.c_str(), file->filename.c_str());
									}

with

							// Also, do not generate warnings for symbols in COMDATs
							if (!coffDetail::IsComdatSection(section))
							{

							}

resulting in

						auto insertIterator = uniqueStaticDataSymbols.emplace(name, static_cast<uint16_t>(0u));
						if (insertIterator.second == false)
						{
							// the name of this symbol is not unique, inform the user.
							// when compiling with control-flow guard (CFG), the compiler will generate
							// non-unique __guard_fids__ symbols - ignore those.
							const ImmutableString& symbolName = GetSymbolName(stringTable, symbol);
							if (!string::Matches(symbolName.c_str(), "__guard_fids__"))
							{
								// BEGIN EPIC MOD
								// VS2019 seems to generate duplicate unwind and pdata block for the "dynamic atexit destructor" method (__F) under some conditions that I can't determine.
								// Also, do not generate warnings for symbols in COMDATs
								if (!coffDetail::IsComdatSection(section))
								{
									if (!string::StartsWith(symbolName.c_str(), "$unwind$??__F") &&
										!string::StartsWith(symbolName.c_str(), "$pdata$??__F"))
									{
										LC_WARNING_USER("Non-unique symbol %s found in COFF file %s. Do not change the order of these variables while live coding, or consider upgrading to a newer compiler (VS 2015 or later)",
											symbolName.c_str(), file->filename.c_str());
									}
									else
									{
										LC_LOG_USER("Non-unique at-exit symbol %s found in COFF file %s. These sometimes appear in debug builds",
											symbolName.c_str(), file->filename.c_str());
									}
								}
								// END EPIC MOD
							}

still all in LC_Coff.cpp
you will also need to build the LiveCodingConsole Project in the UE4 engine source
to get a new LiveCodingConsole.exe

2 Likes