[llvm] 1758952 - [llvm] Adjust remaining LLVM_ABI annotation issues (#224619)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 03:28:07 PDT 2026
Author: Fabrice de Gans
Date: 2026-09-21T03:28:01-07:00
New Revision: 1758952bc409011b935ed814b36e9339f65ee006
URL: https://github.com/llvm/llvm-project/commit/1758952bc409011b935ed814b36e9339f65ee006
DIFF: https://github.com/llvm/llvm-project/commit/1758952bc409011b935ed814b36e9339f65ee006.diff
LOG: [llvm] Adjust remaining LLVM_ABI annotation issues (#224619)
Following up from #224293. Some annotations cannot be automatically
adjusted by the ids-check-helper and idt:
* Only headers under llvm/include are parsed. Source files and internal
headers are not.
* Headers are parsed in release mode, so debug-only declarations are
invisible.
* idt ignores private declarations.
These were found while performing a dylib build on Windows.
The effort to build LLVM as a dylib is tracked in #109483.
Added:
Modified:
llvm/include/llvm/DTLTO/DTLTO.h
llvm/include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h
llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
llvm/include/llvm/SandboxIR/Region.h
llvm/include/llvm/Support/SMTAPI.h
llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
llvm/lib/Transforms/Vectorize/VPlan.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/DTLTO/DTLTO.h b/llvm/include/llvm/DTLTO/DTLTO.h
index 71c0a2f44702f..9213a84ff57e5 100644
--- a/llvm/include/llvm/DTLTO/DTLTO.h
+++ b/llvm/include/llvm/DTLTO/DTLTO.h
@@ -113,7 +113,7 @@ class LLVM_ABI DTLTO : public LTO {
/// but before optimization begins. Existing files are overwritten because
/// they are likely leftovers from a previously terminated linker process and
/// can be safely replaced.
- LLVM_ABI Error extractLTOInputs();
+ Error extractLTOInputs();
// Remove temporary files created to enable distribution.
void cleanup() override;
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h b/llvm/include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h
index d7e666beff6a2..08a17dbee8131 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h
@@ -160,7 +160,7 @@ class JITTargetMachineBuilderPrinter {
JITTargetMachineBuilderPrinter(JITTargetMachineBuilder &JTMB,
StringRef Indent)
: JTMB(JTMB), Indent(Indent) {}
- void print(raw_ostream &OS) const;
+ LLVM_ABI void print(raw_ostream &OS) const;
friend raw_ostream &operator<<(raw_ostream &OS,
const JITTargetMachineBuilderPrinter &JTMBP) {
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h b/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
index b62145b304f1e..c4d43903032ee 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
@@ -312,7 +312,7 @@ class LLVM_ABI LLLazyJIT : public LLJIT {
private:
// Create a single-threaded LLLazyJIT instance.
- LLVM_ABI LLLazyJIT(LLLazyJITBuilderState &S, Error &Err);
+ LLLazyJIT(LLLazyJITBuilderState &S, Error &Err);
std::unique_ptr<LazyCallThroughManager> LCTMgr;
std::unique_ptr<IRPartitionLayer> IPLayer;
diff --git a/llvm/include/llvm/SandboxIR/Region.h b/llvm/include/llvm/SandboxIR/Region.h
index a8c7d80a5294c..25f5d8d587d73 100644
--- a/llvm/include/llvm/SandboxIR/Region.h
+++ b/llvm/include/llvm/SandboxIR/Region.h
@@ -189,10 +189,10 @@ class LLVM_ABI Region {
#ifndef NDEBUG
/// This is an expensive check, meant for testing.
- LLVM_ABI bool operator==(const Region &Other) const;
+ bool operator==(const Region &Other) const;
bool operator!=(const Region &other) const { return !(*this == other); }
- LLVM_ABI void dump(raw_ostream &OS) const;
+ void dump(raw_ostream &OS) const;
void dump() const;
friend raw_ostream &operator<<(raw_ostream &OS, const Region &Rgn) {
Rgn.dump(OS);
diff --git a/llvm/include/llvm/Support/SMTAPI.h b/llvm/include/llvm/Support/SMTAPI.h
index aed6241219c39..1149ad89a16d3 100644
--- a/llvm/include/llvm/Support/SMTAPI.h
+++ b/llvm/include/llvm/Support/SMTAPI.h
@@ -159,7 +159,7 @@ class SMTSolver {
virtual ~SMTSolver() = default;
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
- LLVM_DUMP_METHOD void dump() const;
+ LLVM_ABI LLVM_DUMP_METHOD void dump() const;
#endif
// Returns an appropriate floating-point sort for the given bitwidth.
diff --git a/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp b/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
index 8d261b4d04c1f..bc7f4c5ac1678 100644
--- a/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
@@ -84,7 +84,7 @@ class LoadStoreOptImpl {
// after the potential alias is recorded.
SmallVector<std::pair<MachineInstr *, unsigned>> PotentialAliases;
- LLVM_ABI void addPotentialAlias(MachineInstr &MI);
+ void addPotentialAlias(MachineInstr &MI);
/// Reset this candidate back to an empty one.
void reset() {
diff --git a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
index 8c2eca04e2bcf..b447b3a30249c 100644
--- a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
@@ -196,7 +196,7 @@ class RegBankSelectImpl {
};
/// Insertion point before or after an instruction.
- class LLVM_ABI InstrInsertPoint : public InsertPoint {
+ class InstrInsertPoint : public InsertPoint {
private:
/// Insertion point.
MachineInstr &Instr;
@@ -232,7 +232,7 @@ class RegBankSelectImpl {
};
/// Insertion point at the beginning or end of a basic block.
- class LLVM_ABI MBBInsertPoint : public InsertPoint {
+ class MBBInsertPoint : public InsertPoint {
private:
/// Insertion point.
MachineBasicBlock &MBB;
@@ -270,7 +270,7 @@ class RegBankSelectImpl {
};
/// Insertion point on an edge.
- class LLVM_ABI EdgeInsertPoint : public InsertPoint {
+ class EdgeInsertPoint : public InsertPoint {
private:
/// Source of the edge.
MachineBasicBlock &Src;
@@ -360,10 +360,10 @@ class RegBankSelectImpl {
/// if the machine operand is a physical register. \p P is used to
/// to update liveness information and such when materializing the
/// points.
- LLVM_ABI RepairingPlacement(MachineInstr &MI, unsigned OpIdx,
- const TargetRegisterInfo &TRI, Pass *P,
- MachineFunctionAnalysisManager *MFAM,
- RepairingKind Kind = RepairingKind::Insert);
+ RepairingPlacement(MachineInstr &MI, unsigned OpIdx,
+ const TargetRegisterInfo &TRI, Pass *P,
+ MachineFunctionAnalysisManager *MFAM,
+ RepairingKind Kind = RepairingKind::Insert);
/// \name Getters.
/// @{
@@ -376,15 +376,14 @@ class RegBankSelectImpl {
/// \name Overloaded methods to add an insertion point.
/// @{
/// Add a MBBInsertionPoint to the list of InsertPoints.
- LLVM_ABI void addInsertPoint(MachineBasicBlock &MBB, bool Beginning);
+ void addInsertPoint(MachineBasicBlock &MBB, bool Beginning);
/// Add a InstrInsertionPoint to the list of InsertPoints.
- LLVM_ABI void addInsertPoint(MachineInstr &MI, bool Before);
+ void addInsertPoint(MachineInstr &MI, bool Before);
/// Add an EdgeInsertionPoint (\p Src, \p Dst) to the list of InsertPoints.
- LLVM_ABI void addInsertPoint(MachineBasicBlock &Src,
- MachineBasicBlock &Dst);
+ void addInsertPoint(MachineBasicBlock &Src, MachineBasicBlock &Dst);
/// Add an InsertPoint to the list of insert points.
/// This method takes the ownership of &\p Point.
- LLVM_ABI void addInsertPoint(InsertPoint &Point);
+ void addInsertPoint(InsertPoint &Point);
/// @}
/// \name Accessors related to the insertion points.
@@ -449,28 +448,28 @@ class RegBankSelectImpl {
public:
/// Create a MappingCost assuming that most of the instructions
/// will occur in a basic block with \p LocalFreq frequency.
- LLVM_ABI MappingCost(BlockFrequency LocalFreq);
+ MappingCost(BlockFrequency LocalFreq);
/// Add \p Cost to the local cost.
/// \return true if this cost is saturated, false otherwise.
- LLVM_ABI bool addLocalCost(uint64_t Cost);
+ bool addLocalCost(uint64_t Cost);
/// Add \p Cost to the non-local cost.
/// Non-local cost should reflect the frequency of their placement.
/// \return true if this cost is saturated, false otherwise.
- LLVM_ABI bool addNonLocalCost(uint64_t Cost);
+ bool addNonLocalCost(uint64_t Cost);
/// Saturate the cost to the maximal representable value.
- LLVM_ABI void saturate();
+ void saturate();
/// Return an instance of MappingCost that represents an
/// impossible mapping.
- LLVM_ABI static MappingCost ImpossibleCost();
+ static MappingCost ImpossibleCost();
/// Check if this is less than \p Cost.
- LLVM_ABI bool operator<(const MappingCost &Cost) const;
+ bool operator<(const MappingCost &Cost) const;
/// Check if this is equal to \p Cost.
- LLVM_ABI bool operator==(const MappingCost &Cost) const;
+ bool operator==(const MappingCost &Cost) const;
/// Check if this is not equal to \p Cost.
bool operator!=(const MappingCost &Cost) const { return !(*this == Cost); }
/// Check if this is greater than \p Cost.
@@ -479,10 +478,10 @@ class RegBankSelectImpl {
}
/// Print this on dbgs() stream.
- LLVM_ABI void dump() const;
+ void dump() const;
/// Print this on \p OS;
- LLVM_ABI void print(raw_ostream &OS) const;
+ void print(raw_ostream &OS) const;
/// Overload the stream operator for easy debug printing.
[[maybe_unused]] friend raw_ostream &operator<<(raw_ostream &OS,
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index 4534ff881fcad..91aaa37f798a0 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -565,7 +565,7 @@ class LLVM_ABI_FOR_TEST VPRecipeBase
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
/// Dump the recipe to stderr (for debugging).
- LLVM_ABI_FOR_TEST void dump() const;
+ void dump() const;
/// Print the recipe, delegating to printRecipe().
void print(raw_ostream &O, const Twine &Indent,
@@ -695,7 +695,7 @@ class LLVM_ABI_FOR_TEST VPSingleDefRecipe : public VPRecipeBase,
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
/// Print this VPSingleDefRecipe to dbgs() (for debugging).
- LLVM_ABI_FOR_TEST LLVM_DUMP_METHOD void dump() const;
+ LLVM_DUMP_METHOD void dump() const;
#endif
};
More information about the llvm-commits
mailing list