Skip to content

Commit af75148

Browse files
dpaolielloxgupta
authored andcommitted
Remove support for EXPORTAS in def files to maintain ABI compatibility for COFFShortExport
1 parent a625c59 commit af75148

File tree

3 files changed

+1
-110
lines changed

3 files changed

+1
-110
lines changed

llvm/include/llvm/Object/COFFImportFile.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,6 @@ struct COFFShortExport {
104104
/// file, this is "baz" in "EXPORTS\nfoo = bar == baz".
105105
std::string ImportName;
106106

107-
/// Specifies EXPORTAS name. In a .def file, this is "bar" in
108-
/// "EXPORTS\nfoo EXPORTAS bar".
109-
std::string ExportAs;
110-
111107
uint16_t Ordinal = 0;
112108
bool Noname = false;
113109
bool Data = false;

llvm/lib/Object/COFFModuleDefinition.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ enum Kind {
3939
KwConstant,
4040
KwData,
4141
KwExports,
42-
KwExportAs,
4342
KwHeapsize,
4443
KwLibrary,
4544
KwName,
@@ -117,7 +116,6 @@ class Lexer {
117116
.Case("CONSTANT", KwConstant)
118117
.Case("DATA", KwData)
119118
.Case("EXPORTS", KwExports)
120-
.Case("EXPORTAS", KwExportAs)
121119
.Case("HEAPSIZE", KwHeapsize)
122120
.Case("LIBRARY", KwLibrary)
123121
.Case("NAME", KwName)
@@ -284,16 +282,7 @@ class Parser {
284282
E.ImportName = std::string(Tok.Value);
285283
continue;
286284
}
287-
// EXPORTAS must be at the end of export definition
288-
if (Tok.K == KwExportAs) {
289-
read();
290-
if (Tok.K == Eof)
291-
return createError(
292-
"unexpected end of file, EXPORTAS identifier expected");
293-
E.ExportAs = std::string(Tok.Value);
294-
} else {
295-
unget();
296-
}
285+
unget();
297286
Info.Exports.push_back(E);
298287
return Error::success();
299288
}

llvm/test/tools/llvm-lib/exportas.test

Lines changed: 0 additions & 94 deletions
This file was deleted.

0 commit comments

Comments
 (0)