[llvm] [ORC] Add AutoImportGenerator for COFF dllimport auto-import (PR #203914)

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 04:37:02 PDT 2026


================
@@ -1528,6 +1535,38 @@ Error Session::loadAndLinkDynamicLibrary(JITDylib &JD, StringRef LibPath) {
   return Error::success();
 }
 
+Expected<JITDylib *> Session::getOrLoadAutoImportDLL(StringRef LibPath) {
+  auto It = AutoImportJDs.find(LibPath);
+  if (It != AutoImportJDs.end()) {
+    return It->second;
+  }
----------------
lhames wrote:

Side note: The LLVM coding conventions omit the braces around single statements, but I see that braces were included in the original `getOrLoadDynamicLibrary` so I already let this past at least once. ;)

You can fix prior to merge if you want, otherwise I'll fix this (and `getOrLoadDynamicLibrary`) post-merge.

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


More information about the llvm-commits mailing list