diff --git a/llvm/include/llvm/Passes/PassPlugin.h b/llvm/include/llvm/Passes/PassPlugin.h index 013b7a827c47dd..967de9f29ba795 100644 --- a/llvm/include/llvm/Passes/PassPlugin.h +++ b/llvm/include/llvm/Passes/PassPlugin.h @@ -107,7 +107,13 @@ class PassPlugin { /// }; /// } /// ``` + +#if defined(_WIN32) && defined(LLVM_BUILD_LLVM_DYLIB) +extern "C" ::llvm::PassPluginLibraryInfo __declspec(dllexport) +llvmGetPassPluginInfo(); +#else extern "C" ::llvm::PassPluginLibraryInfo LLVM_ATTRIBUTE_WEAK llvmGetPassPluginInfo(); +#endif #endif /* LLVM_PASSES_PASSPLUGIN_H */