[lld] [LLD][COFF] Add support for EXPORTAS import name type. (PR #86541)

Jacek Caban via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 25 14:26:13 PDT 2024


================
@@ -607,6 +608,13 @@ Export LinkerDriver::parseExport(StringRef arg) {
       e.isPrivate = true;
       continue;
     }
+    if (tok.equals_insensitive("exportas")) {
+      if (!rest.empty() && !rest.contains(','))
+        e.exportAs = rest;
+      else
+        error("invalid EXPORTAS value: " + rest);
----------------
cjacek wrote:

I followed recommendation from  [ErrorHandler.h](https://github.com/llvm/llvm-project/blob/36713a47c8fea0732bcb798ffba4e7c5d22d19f3/lld/include/lld/Common/ErrorHandler.h#L34) to continue as far as we can. Skipping setting `exportAs` is enough to leave the export in a consistent state.

https://github.com/llvm/llvm-project/pull/86541


More information about the llvm-commits mailing list