summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/lib/Driver/WinLinkDriver.cpp10
-rw-r--r--lld/test/pecoff/export.test2
2 files changed, 8 insertions, 4 deletions
diff --git a/lld/lib/Driver/WinLinkDriver.cpp b/lld/lib/Driver/WinLinkDriver.cpp
index f4e32b39943..71f9cfd17ea 100644
--- a/lld/lib/Driver/WinLinkDriver.cpp
+++ b/lld/lib/Driver/WinLinkDriver.cpp
@@ -361,10 +361,10 @@ static bool parseManifestUAC(StringRef option,
}
}
-// Parse /export:entryname[=internalname][,@ordinal[,NONAME]][,DATA].
+// Parse /export:entryname[=internalname][,@ordinal[,NONAME]][,DATA][,PRIVATE].
//
-// MSDN doesn't say anything about /export:foo=bar style option,
-// but link.exe actually accepts it.
+// MSDN doesn't say anything about /export:foo=bar style option or PRIVATE
+// attribtute, but link.exe actually accepts them.
static bool parseExport(StringRef option,
PECOFFLinkingContext::ExportDesc &ret) {
StringRef name;
@@ -396,6 +396,10 @@ static bool parseExport(StringRef option,
ret.isData = true;
continue;
}
+ if (arg.equals_lower("private")) {
+ ret.isPrivate = true;
+ continue;
+ }
if (arg.startswith("@")) {
int ordinal;
if (arg.substr(1).getAsInteger(0, ordinal))
diff --git a/lld/test/pecoff/export.test b/lld/test/pecoff/export.test
index f8e75bf605d..007698198ec 100644
--- a/lld/test/pecoff/export.test
+++ b/lld/test/pecoff/export.test
@@ -73,7 +73,7 @@ DUP-NOT: 1 0x2010 exportfn8
# RUN: yaml2obj %p/Inputs/export.obj.yaml > %t.obj
#
# RUN: lld -flavor link /out:%t1.dll /dll /entry:init \
-# RUN: /export:f1=exportfn1 /export:f2=exportfn2 -- %t.obj
+# RUN: /export:f1=exportfn1 /export:f2=exportfn2,private -- %t.obj
# RUN: llvm-objdump -p %t1.dll | FileCheck -check-prefix=EQUAL %s
EQUAL: Export Table:
OpenPOWER on IntegriCloud