aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
diff options
context:
space:
mode:
authorAndrew Rogers <andrurogerz@gmail.com>2025-06-17 17:21:40 -0700
committerGitHub <noreply@github.com>2025-06-17 17:21:40 -0700
commitabbdd1670d8b12dd72ec353b14e256619ff4694b (patch)
treef699bf7ec06d2a330fd0d803f5ee23f9f124a16b /llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
parent64155a32297f4884875783664ff13bec9ab376f5 (diff)
downloadllvm-abbdd1670d8b12dd72ec353b14e256619ff4694b.zip
llvm-abbdd1670d8b12dd72ec353b14e256619ff4694b.tar.gz
llvm-abbdd1670d8b12dd72ec353b14e256619ff4694b.tar.bz2
[llvm] minor fixes for clang-cl Windows DLL build (#144386)
## Purpose This patch makes a minor changes to LLVM and Clang so that LLVM can be built as a Windows DLL with `clang-cl`. These changes were not required for building a Windows DLL with MSVC. ## Background The Windows DLL 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). ## Overview Specific changes made in this patch: - Remove `constexpr` fields that reference DLL exported symbols. These symbols cannot be resolved at compile time when building a Windows DLL using `clang-cl`, so they cannot be `constexpr`. Instead, they are made `const` and initialized in the implementation file rather than at declaration in the header. - Annotate symbols now defined out-of-line with `LLVM_ABI` so they are exported when building as a shared library. - Explicitly add default copy assignment operator for `ELFFile` to resolve a compiler warning. ## 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/Target/RISCV/Disassembler/RISCVDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions