[all-commits] [llvm/llvm-project] 9c5f45: [llvm] annotate interfaces in llvm/Support for DLL...
Andrew Rogers via All-commits
all-commits at lists.llvm.org
Mon May 12 12:14:14 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9c5f451d1c59b4e35742b572bee6576a44e10672
https://github.com/llvm/llvm-project/commit/9c5f451d1c59b4e35742b572bee6576a44e10672
Author: Andrew Rogers <andrurogerz at gmail.com>
Date: 2025-05-12 (Mon, 12 May 2025)
Changed paths:
M llvm/include/llvm/Support/AArch64AttributeParser.h
M llvm/include/llvm/Support/AMDGPUMetadata.h
M llvm/include/llvm/Support/ARMAttributeParser.h
M llvm/include/llvm/Support/ARMBuildAttributes.h
M llvm/include/llvm/Support/ARMWinEH.h
M llvm/include/llvm/Support/Allocator.h
M llvm/include/llvm/Support/BalancedPartitioning.h
M llvm/include/llvm/Support/Base64.h
M llvm/include/llvm/Support/BinaryStreamError.h
M llvm/include/llvm/Support/BinaryStreamReader.h
M llvm/include/llvm/Support/BinaryStreamRef.h
M llvm/include/llvm/Support/BinaryStreamWriter.h
M llvm/include/llvm/Support/BlockFrequency.h
M llvm/include/llvm/Support/BranchProbability.h
M llvm/include/llvm/Support/BuryPointer.h
M llvm/include/llvm/Support/COM.h
M llvm/include/llvm/Support/CRC.h
M llvm/include/llvm/Support/CSKYAttributeParser.h
M llvm/include/llvm/Support/CSKYAttributes.h
M llvm/include/llvm/Support/CachePruning.h
M llvm/include/llvm/Support/Caching.h
M llvm/include/llvm/Support/Chrono.h
M llvm/include/llvm/Support/CommandLine.h
M llvm/include/llvm/Support/Compression.h
M llvm/include/llvm/Support/ConvertEBCDIC.h
M llvm/include/llvm/Support/ConvertUTF.h
M llvm/include/llvm/Support/CrashRecoveryContext.h
M llvm/include/llvm/Support/DJB.h
M llvm/include/llvm/Support/DataExtractor.h
M llvm/include/llvm/Support/Debug.h
M llvm/include/llvm/Support/DebugCounter.h
M llvm/include/llvm/Support/DivisionByConstantInfo.h
M llvm/include/llvm/Support/DynamicLibrary.h
M llvm/include/llvm/Support/ELFAttrParserCompact.h
M llvm/include/llvm/Support/ELFAttrParserExtended.h
M llvm/include/llvm/Support/ELFAttributes.h
M llvm/include/llvm/Support/Errno.h
M llvm/include/llvm/Support/Error.h
M llvm/include/llvm/Support/ErrorHandling.h
M llvm/include/llvm/Support/ExponentialBackoff.h
M llvm/include/llvm/Support/ExtensibleRTTI.h
M llvm/include/llvm/Support/FileCollector.h
M llvm/include/llvm/Support/FileOutputBuffer.h
M llvm/include/llvm/Support/FileSystem.h
M llvm/include/llvm/Support/FileUtilities.h
M llvm/include/llvm/Support/Format.h
M llvm/include/llvm/Support/FormatVariadic.h
M llvm/include/llvm/Support/FormatVariadicDetails.h
M llvm/include/llvm/Support/FormattedStream.h
M llvm/include/llvm/Support/GlobPattern.h
M llvm/include/llvm/Support/GraphWriter.h
M llvm/include/llvm/Support/HexagonAttributeParser.h
M llvm/include/llvm/Support/HexagonAttributes.h
M llvm/include/llvm/Support/InitLLVM.h
M llvm/include/llvm/Support/InstructionCost.h
M llvm/include/llvm/Support/JSON.h
M llvm/include/llvm/Support/KnownBits.h
M llvm/include/llvm/Support/LEB128.h
M llvm/include/llvm/Support/LineIterator.h
M llvm/include/llvm/Support/Locale.h
M llvm/include/llvm/Support/LockFileManager.h
M llvm/include/llvm/Support/MD5.h
M llvm/include/llvm/Support/MSP430AttributeParser.h
M llvm/include/llvm/Support/MSP430Attributes.h
M llvm/include/llvm/Support/ManagedStatic.h
M llvm/include/llvm/Support/MathExtras.h
M llvm/include/llvm/Support/MemAlloc.h
M llvm/include/llvm/Support/Memory.h
M llvm/include/llvm/Support/MemoryBuffer.h
M llvm/include/llvm/Support/MemoryBufferRef.h
M llvm/include/llvm/Support/ModRef.h
M llvm/include/llvm/Support/Mustache.h
M llvm/include/llvm/Support/NativeFormatting.h
M llvm/include/llvm/Support/OptimizedStructLayout.h
M llvm/include/llvm/Support/PGOOptions.h
M llvm/include/llvm/Support/Parallel.h
M llvm/include/llvm/Support/Path.h
M llvm/include/llvm/Support/PluginLoader.h
M llvm/include/llvm/Support/PrettyStackTrace.h
M llvm/include/llvm/Support/Process.h
M llvm/include/llvm/Support/Program.h
M llvm/include/llvm/Support/RISCVAttributeParser.h
M llvm/include/llvm/Support/RISCVAttributes.h
M llvm/include/llvm/Support/RISCVISAUtils.h
M llvm/include/llvm/Support/RandomNumberGenerator.h
M llvm/include/llvm/Support/Recycler.h
M llvm/include/llvm/Support/Regex.h
M llvm/include/llvm/Support/SHA1.h
M llvm/include/llvm/Support/SHA256.h
M llvm/include/llvm/Support/SMTAPI.h
M llvm/include/llvm/Support/ScaledNumber.h
M llvm/include/llvm/Support/ScopedPrinter.h
M llvm/include/llvm/Support/Signals.h
M llvm/include/llvm/Support/Signposts.h
M llvm/include/llvm/Support/SipHash.h
M llvm/include/llvm/Support/SmallVectorMemoryBuffer.h
M llvm/include/llvm/Support/SourceMgr.h
M llvm/include/llvm/Support/SpecialCaseList.h
M llvm/include/llvm/Support/StringSaver.h
M llvm/include/llvm/Support/SuffixTree.h
M llvm/include/llvm/Support/SuffixTreeNode.h
M llvm/include/llvm/Support/SystemUtils.h
M llvm/include/llvm/Support/TarWriter.h
M llvm/include/llvm/Support/TargetSelect.h
M llvm/include/llvm/Support/ThreadPool.h
M llvm/include/llvm/Support/Threading.h
M llvm/include/llvm/Support/TimeProfiler.h
M llvm/include/llvm/Support/Timer.h
M llvm/include/llvm/Support/ToolOutputFile.h
M llvm/include/llvm/Support/TypeSize.h
M llvm/include/llvm/Support/Unicode.h
M llvm/include/llvm/Support/Valgrind.h
M llvm/include/llvm/Support/VersionTuple.h
M llvm/include/llvm/Support/VirtualFileSystem.h
M llvm/include/llvm/Support/Windows/WindowsSupport.h
M llvm/include/llvm/Support/WindowsError.h
M llvm/include/llvm/Support/WithColor.h
M llvm/include/llvm/Support/YAMLParser.h
M llvm/include/llvm/Support/YAMLTraits.h
M llvm/include/llvm/Support/raw_os_ostream.h
M llvm/include/llvm/Support/raw_ostream.h
M llvm/include/llvm/Support/raw_socket_stream.h
M llvm/include/llvm/Support/thread.h
M llvm/include/llvm/Support/xxhash.h
M llvm/lib/Support/Chrono.cpp
M llvm/lib/Support/CommandLine.cpp
Log Message:
-----------
[llvm] annotate interfaces in llvm/Support for DLL export (#136014)
## Purpose
This patch is one in a series of code-mods that annotate LLVM’s public
interface for export. This patch annotates the `llvm/Support` library.
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.
- Add `LLVM_ABI` to Windows-only code (auto generated with IDS on
Windows)
- Explicitly make classes non-copyable where needed to due IDS adding
`LLVM_ABI` at the class level
- Add `LLVM_TEMPLATE_ABI` and `LLVM_EXPORT_TEMPLATE` to exported
instantiated templates
- Add `LLVM_ABI_FRIEND` to a small number of `friend` function
declarations
- Add `LLVM_ABI` to a subset of private class methods and fields that
require export
- Add `LLVM_ABI` to a small number of symbols that require export but
are not declared in headers
- Add `LLVM_ABI` functions defined via X-macro
## 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
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list