[PECOFF] Do not print @<ordinal> if the symbol is private

lib.exe prints a warning if a symbol in a module definition file has
both the PRIVATE attribute and an ordinal like this.

  EXPORTS
    foo @1 PRIVATE

This patch suppresses that.

llvm-svn: 218395
This commit is contained in:
Rui Ueyama 2014-09-24 17:51:51 +00:00
parent 2e0717e129
commit 1c244f5db3
1 changed files with 3 additions and 1 deletions

View File

@ -30,7 +30,9 @@ createModuleDefinitionFile(const PECOFFLinkingContext &ctx) {
<< "EXPORTS\n";
for (const PECOFFLinkingContext::ExportDesc &desc : ctx.getDllExports()) {
os << " " << desc.externalName << " @" << desc.ordinal;
os << " " << desc.externalName;
if (!desc.isPrivate)
os << " @" << desc.ordinal;
if (desc.noname)
os << " NONAME";
if (desc.isData)