mirror of
https://github.com/intel/llvm.git
synced 2026-01-28 10:38:23 +08:00
COFF: add support for CONSTANT exports
The CONSTANT export type is marked as obsolete, but link still supports this. Furthermore, WinObjC uses this for certain exports. Add support for this export type. llvm-svn: 301013
This commit is contained in:
@@ -38,6 +38,7 @@ enum Kind {
|
||||
Comma,
|
||||
Equal,
|
||||
KwBase,
|
||||
KwConstant,
|
||||
KwData,
|
||||
KwExports,
|
||||
KwHeapsize,
|
||||
@@ -92,6 +93,7 @@ public:
|
||||
StringRef Word = Buf.substr(0, End);
|
||||
Kind K = llvm::StringSwitch<Kind>(Word)
|
||||
.Case("BASE", KwBase)
|
||||
.Case("CONSTANT", KwConstant)
|
||||
.Case("DATA", KwData)
|
||||
.Case("EXPORTS", KwExports)
|
||||
.Case("HEAPSIZE", KwHeapsize)
|
||||
@@ -227,6 +229,11 @@ private:
|
||||
E.Data = true;
|
||||
continue;
|
||||
}
|
||||
if (Tok.K == KwConstant) {
|
||||
warn("CONSTANT keyword is obsolete; use DATA");
|
||||
E.Constant = true;
|
||||
continue;
|
||||
}
|
||||
if (Tok.K == KwPrivate) {
|
||||
E.Private = true;
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user