[PATCH] D109192: [WIP/DNM] Support: introduce public API annotation support

Joachim Meyer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 4 13:34:50 PDT 2021


fodinabor added a comment.

The missing symbols on Linux are: `DebugFlag`, `isCurrentDebugType`, `Error::fatalUncheckedError` and vtables of `cl::opt`, `ErrorList` and `cl::OptionValue<std::string>`.



================
Comment at: llvm/include/llvm/ADT/APInt.h:72
 ///
-class LLVM_NODISCARD APInt {
+class LLVM_NODISCARD LLVM_SUPPORT_ABI APInt {
 public:
----------------
Linux needs `LLVM_SUPPORT_ABI LLVM_NODISCARD`

Same with APSInt


================
Comment at: llvm/include/llvm/ADT/SmallVector.h:92
 
+extern template LLVM_SUPPORT_ABI SmallVectorBase<uint32_t>;
+#if SIZE_MAX > UINT32_MAX
----------------
missing `class` after `template`
two lines below as well

As the external functions are already marked `LLVM_SUPPORT_ABI` I'm not sure we need the annotation here anyways?
Otherwise, the `LLVM_SUPPORT_ABI` here should only be added for Linux, and the annotation has to be added to the explicit instantiation in SmallVector.cpp as well (for both Win / Linux) 


================
Comment at: llvm/include/llvm/Support/LLVMSupportExports.h:30
+# if defined(LLVM_SUPPORT_STATIC)
+#   define LLVM_SUPPORT_abi
+# else
----------------
typo


================
Comment at: llvm/include/llvm/Support/YAMLTraits.h:21
 #include "llvm/Support/Endian.h"
+#include "llvm/SUpport/LLVMSupportExports.h"
 #include "llvm/Support/Regex.h"
----------------
`U` typo, in MD5.h as well.


================
Comment at: llvm/lib/Support/Windows/Threading.inc:27
 namespace llvm {
-HANDLE
+LLVM_SUPPORT_ABI HANDLE
 llvm_execute_on_thread_impl(unsigned(__stdcall *ThreadFunc)(void *), void *Arg,
----------------
same changes required for Unix/Threading.inc to silence the warnings there


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109192/new/

https://reviews.llvm.org/D109192



More information about the llvm-commits mailing list