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

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 2 02:50:09 PDT 2026


================
@@ -583,5 +583,134 @@ DLLImportDefinitionGenerator::createStubsGraph(const SymbolMap &Resolved) {
   return std::move(G);
 }
 
+Expected<std::unique_ptr<AutoImportGenerator>>
+AutoImportGenerator::Load(ExecutionSession &ES, ObjectLinkingLayer &L,
+                          DylibManager &DylibMgr, const char *LibraryPath) {
+  // x86_64-only for now: createStubsGraph emits x86_64 pointer slots / stubs.
+  if (ES.getTargetTriple().getArch() != Triple::x86_64)
+    return make_error<StringError>(
+        "AutoImportGenerator currently only supports x86_64",
+        inconvertibleErrorCode());
+
+  // Load the library in the executor. Symbols are later resolved via
----------------
mkovacevic99 wrote:

Thanks for your review, I will start addressing your comments now but I will probably submit them from Monday, just wanted to let you know that, sorry for the delay

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


More information about the llvm-commits mailing list