aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode
diff options
context:
space:
mode:
authorAndrew Rogers <andrurogerz@gmail.com>2025-06-04 10:28:58 -0700
committerGitHub <noreply@github.com>2025-06-04 10:28:58 -0700
commitecbe2e8c3f8f4be87d5d30ad5d1fcc1986fa5c47 (patch)
tree06ba6b464c8e3f4aba7ff59bde861264ef0ea8f2 /llvm/lib/Bitcode
parent68a346f71d9b54f2e439007336285420ece0de39 (diff)
downloadllvm-ecbe2e8c3f8f4be87d5d30ad5d1fcc1986fa5c47.zip
llvm-ecbe2e8c3f8f4be87d5d30ad5d1fcc1986fa5c47.tar.gz
llvm-ecbe2e8c3f8f4be87d5d30ad5d1fcc1986fa5c47.tar.bz2
[llvm] annotate interfaces in llvm/ObjCopy and llvm/Object for DLL export (#142668)
## Purpose This patch is one in a series of code-mods that annotate LLVM’s public interface for export. This patch annotates the `llvm/ObjCopy` and `llvm/Object` libraries. These annotations currently have no meaningful impact on the LLVM build; however, they are a prerequisite to support an LLVM Windows DLL (shared library) build. ## Background This effort is tracked in #109483. Additional context is provided in [this discourse](https://discourse.llvm.org/t/psa-annotating-llvm-public-interface/85307), and documentation for `LLVM_ABI` and related annotations is found in the LLVM repo [here](https://github.com/llvm/llvm-project/blob/main/llvm/docs/InterfaceExportAnnotations.rst). The bulk of these changes were generated automatically using the [Interface Definition Scanner (IDS)](https://github.com/compnerd/ids) tool, followed formatting with `git clang-format`. The following manual adjustments were also applied after running IDS on Linux: - Add `#include "llvm/Support/Compiler.h"` to files where it was not auto-added by IDS due to no pre-existing block of include statements. - Manually annotate template class `CommonArchiveMemberHeader` with `LLVM_ABI` since IDS ignores templates and this is the simplest solution for DLL-exporting its child classes because it has methods defined out-of-line. Seems to be an uncommon situation. - Explicitly make `Archive` class non-copyable due to the class-level `LLVM_ABI` annotation. - Add default constructor to `ELFFile` so it can be instantiated for DLL-export as a base class. - Add `LLVM_TEMPLATE_ABI` and `LLVM_EXPORT_TEMPLATE` to exported instantiated templates. ## Validation Local builds and tests to validate cross-platform compatibility. This included llvm, clang, and lldb on the following configurations: - Windows with MSVC - Windows with Clang - Linux with GCC - Linux with Clang - Darwin with Clang
Diffstat (limited to 'llvm/lib/Bitcode')
0 files changed, 0 insertions, 0 deletions