[llvm] [llvm] annotate interfaces in llvm/Support for DLL export (PR #136014)

Alexander Richardson via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 29 16:52:56 PDT 2025


================
@@ -16,34 +16,41 @@
 #define LLVM_SUPPORT_TARGETSELECT_H
 
 #include "llvm/Config/llvm-config.h"
+#include "llvm/Support/Compiler.h"
 
 extern "C" {
   // Declare all of the target-initialization functions that are available.
-#define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##TargetInfo();
+#define LLVM_TARGET(TargetName)                                                \
+  LLVM_ABI void LLVMInitialize##TargetName##TargetInfo();
----------------
arichardson wrote:

I'm not quite sure what is generated by these includes, but would it possible to remove the `extern "C"` block above if we make these macros use `LLVM_C_ABI` which I imagine would expand to `extern "C"`

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


More information about the llvm-commits mailing list