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

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 16 15:38:06 PDT 2025


================
@@ -1176,17 +1182,17 @@ class ExpectedAsOutParameter {
 /// (or Expected) and you want to call code that still returns
 /// std::error_codes.
 class ECError : public ErrorInfo<ECError> {
-  friend Error errorCodeToError(std::error_code);
+  LLVM_ABI friend Error errorCodeToError(std::error_code);
 
-  void anchor() override;
+  LLVM_ABI void anchor() override;
----------------
compnerd wrote:

Some day, it would be nice to conditionalise these to `__ELF__` targets. These are meaningless in a Windows world where the virtual table is not homed if a key function exists. The required COMDAT emission is unavoidable. I do wonder what the cost is for the COMDAT folding in the modern ELF world.

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


More information about the llvm-commits mailing list