Skip to content

Commit

Permalink
Remove support for EXPORTAS in def files to maintain ABI compatibilit…
Browse files Browse the repository at this point in the history
…y for COFFShortExport
  • Loading branch information
dpaoliello authored and xgupta committed Oct 8, 2024
1 parent a625c59 commit af75148
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 110 deletions.
4 changes: 0 additions & 4 deletions llvm/include/llvm/Object/COFFImportFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@ struct COFFShortExport {
/// file, this is "baz" in "EXPORTS\nfoo = bar == baz".
std::string ImportName;

/// Specifies EXPORTAS name. In a .def file, this is "bar" in
/// "EXPORTS\nfoo EXPORTAS bar".
std::string ExportAs;

uint16_t Ordinal = 0;
bool Noname = false;
bool Data = false;
Expand Down
13 changes: 1 addition & 12 deletions llvm/lib/Object/COFFModuleDefinition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ enum Kind {
KwConstant,
KwData,
KwExports,
KwExportAs,
KwHeapsize,
KwLibrary,
KwName,
Expand Down Expand Up @@ -117,7 +116,6 @@ class Lexer {
.Case("CONSTANT", KwConstant)
.Case("DATA", KwData)
.Case("EXPORTS", KwExports)
.Case("EXPORTAS", KwExportAs)
.Case("HEAPSIZE", KwHeapsize)
.Case("LIBRARY", KwLibrary)
.Case("NAME", KwName)
Expand Down Expand Up @@ -284,16 +282,7 @@ class Parser {
E.ImportName = std::string(Tok.Value);
continue;
}
// EXPORTAS must be at the end of export definition
if (Tok.K == KwExportAs) {
read();
if (Tok.K == Eof)
return createError(
"unexpected end of file, EXPORTAS identifier expected");
E.ExportAs = std::string(Tok.Value);
} else {
unget();
}
unget();
Info.Exports.push_back(E);
return Error::success();
}
Expand Down
94 changes: 0 additions & 94 deletions llvm/test/tools/llvm-lib/exportas.test

This file was deleted.

0 comments on commit af75148

Please sign in to comment.