[llvm] [llvm] Fix most remaining LLVM_ABI annotations (PR #203267)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 11 06:46:07 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-support
Author: Fabrice de Gans (Steelskin)
<details>
<summary>Changes</summary>
This updates most LLVM_ABI annotations in the public LLVM headers to match expected usage:
* All public APIs should be properly annotated.
* Inlined functions should not be annotated.
These changes were done by a script fixing annotations on LLVM public headers and manually checked.
This effort is tracked in #<!-- -->109483.
---
Patch is 92.70 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/203267.diff
48 Files Affected:
- (modified) llvm/include/llvm/ABI/FunctionInfo.h (+1-1)
- (modified) llvm/include/llvm/ABI/IRTypeMapper.h (+1-1)
- (modified) llvm/include/llvm/ABI/TargetInfo.h (+7-6)
- (modified) llvm/include/llvm/ABI/Types.h (+2-2)
- (modified) llvm/include/llvm/ADT/APFloat.h (+5-4)
- (modified) llvm/include/llvm/AsmParser/LLLexer.h (+5-5)
- (modified) llvm/include/llvm/AsmParser/LLParser.h (+34-29)
- (modified) llvm/include/llvm/BinaryFormat/DXContainer.h (+14-14)
- (modified) llvm/include/llvm/CGData/StableFunctionMap.h (+1-1)
- (modified) llvm/include/llvm/CodeGen/MachineInstrBundle.h (+2-2)
- (modified) llvm/include/llvm/CodeGen/RegAllocEvictionAdvisor.h (+2-2)
- (modified) llvm/include/llvm/CodeGenTypes/LowLevelType.h (+1-1)
- (modified) llvm/include/llvm/DTLTO/DTLTO.h (+14-17)
- (modified) llvm/include/llvm/DWARFLinker/Classic/DWARFLinkerDeclContext.h (+4-5)
- (modified) llvm/include/llvm/DWARFLinker/Utils.h (+1-1)
- (modified) llvm/include/llvm/DWP/ELFWriter.h (+9-7)
- (modified) llvm/include/llvm/ExecutionEngine/Orc/EPCGenericDylibManager.h (+11-14)
- (modified) llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h (+1-1)
- (modified) llvm/include/llvm/IR/PrintPasses.h (+4-3)
- (modified) llvm/include/llvm/LTO/LTO.h (+14-16)
- (modified) llvm/include/llvm/LTO/legacy/UpdateCompilerUsed.h (+2-2)
- (modified) llvm/include/llvm/MC/DXContainerInfo.h (+20-19)
- (modified) llvm/include/llvm/MC/MCDwarf.h (+1-1)
- (modified) llvm/include/llvm/MC/MCSchedule.h (+1-1)
- (modified) llvm/include/llvm/MC/MCWin64EH.h (+2-1)
- (modified) llvm/include/llvm/Object/Archive.h (+2-2)
- (modified) llvm/include/llvm/ObjectYAML/BBAddrMapYAML.h (+9-7)
- (modified) llvm/include/llvm/Option/Option.h (+1-1)
- (modified) llvm/include/llvm/Plugins/PassPlugin.h (+1-1)
- (modified) llvm/include/llvm/ProfileData/ETMTraceDecoder.h (+1-1)
- (modified) llvm/include/llvm/ProfileData/InstrProfReader.h (+1-1)
- (modified) llvm/include/llvm/ProfileData/SampleProf.h (+1-1)
- (modified) llvm/include/llvm/Remarks/BitstreamRemarkSerializer.h (+15-14)
- (modified) llvm/include/llvm/Remarks/RemarkStreamer.h (+6-5)
- (modified) llvm/include/llvm/Support/Win64EH.h (+5-3)
- (modified) llvm/include/llvm/TargetParser/RISCVTargetParser.h (+2-2)
- (modified) llvm/include/llvm/TargetParser/Triple.h (+1-1)
- (modified) llvm/include/llvm/TargetParser/XtensaTargetParser.h (+5-4)
- (modified) llvm/include/llvm/TextAPI/Target.h (+1-1)
- (modified) llvm/include/llvm/Transforms/IPO/Instrumentor.h (+213-159)
- (modified) llvm/include/llvm/Transforms/IPO/InstrumentorConfigFile.h (+8-6)
- (modified) llvm/include/llvm/Transforms/IPO/InstrumentorStubPrinter.h (+4-4)
- (modified) llvm/include/llvm/Transforms/InstCombine/InstCombiner.h (+2-1)
- (modified) llvm/include/llvm/Transforms/Utils/SSAUpdaterImpl.h (+1-1)
- (modified) llvm/include/llvm/Transforms/Utils/TriggerCrashPass.h (+3-3)
- (modified) llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h (+1-1)
- (modified) llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SandboxVectorizerIR.h (+3-3)
- (modified) llvm/include/llvm/XRay/FDRTraceExpander.h (+1-1)
``````````diff
diff --git a/llvm/include/llvm/ABI/FunctionInfo.h b/llvm/include/llvm/ABI/FunctionInfo.h
index 0ebd0700836e2..3fbbf840bdcec 100644
--- a/llvm/include/llvm/ABI/FunctionInfo.h
+++ b/llvm/include/llvm/ABI/FunctionInfo.h
@@ -234,7 +234,7 @@ class FunctionInfo final : private TrailingObjects<FunctionInfo, ArgEntry> {
unsigned arg_size() const { return NumArgs; }
- static std::unique_ptr<FunctionInfo>
+ LLVM_ABI static std::unique_ptr<FunctionInfo>
create(CallingConv::ID CC, const Type *ReturnType,
ArrayRef<const Type *> ArgTypes,
std::optional<unsigned> NumRequired = std::nullopt);
diff --git a/llvm/include/llvm/ABI/IRTypeMapper.h b/llvm/include/llvm/ABI/IRTypeMapper.h
index 1a77cfd91bca9..0fbb9a550348b 100644
--- a/llvm/include/llvm/ABI/IRTypeMapper.h
+++ b/llvm/include/llvm/ABI/IRTypeMapper.h
@@ -32,7 +32,7 @@ class IRTypeMapper {
public:
IRTypeMapper(LLVMContext &Ctx, const DataLayout &DL) : Context(Ctx), DL(DL) {}
- llvm::Type *convertType(const abi::Type *ABIType);
+ LLVM_ABI llvm::Type *convertType(const abi::Type *ABIType);
void clearCache() { TypeCache.clear(); }
diff --git a/llvm/include/llvm/ABI/TargetInfo.h b/llvm/include/llvm/ABI/TargetInfo.h
index f4feb3b164fbb..9040c2a909c8c 100644
--- a/llvm/include/llvm/ABI/TargetInfo.h
+++ b/llvm/include/llvm/ABI/TargetInfo.h
@@ -74,14 +74,15 @@ class TargetInfo {
const ABICompatInfo &getABICompatInfo() const { return CompatInfo; }
protected:
- RecordArgABI getRecordArgABI(const RecordType *RT) const;
- RecordArgABI getRecordArgABI(const Type *Ty) const;
- bool isPromotableInteger(const IntegerType *IT) const;
- ArgInfo getNaturalAlignIndirect(const Type *Ty, bool ByVal = true) const;
- bool isAggregateTypeForABI(const Type *Ty) const;
+ LLVM_ABI RecordArgABI getRecordArgABI(const RecordType *RT) const;
+ LLVM_ABI RecordArgABI getRecordArgABI(const Type *Ty) const;
+ LLVM_ABI bool isPromotableInteger(const IntegerType *IT) const;
+ LLVM_ABI ArgInfo getNaturalAlignIndirect(const Type *Ty,
+ bool ByVal = true) const;
+ LLVM_ABI bool isAggregateTypeForABI(const Type *Ty) const;
};
-std::unique_ptr<TargetInfo> createBPFTargetInfo(TypeBuilder &TB);
+LLVM_ABI std::unique_ptr<TargetInfo> createBPFTargetInfo(TypeBuilder &TB);
} // namespace abi
} // namespace llvm
diff --git a/llvm/include/llvm/ABI/Types.h b/llvm/include/llvm/ABI/Types.h
index b66f28212fa4f..7b7efaf5841cc 100644
--- a/llvm/include/llvm/ABI/Types.h
+++ b/llvm/include/llvm/ABI/Types.h
@@ -244,7 +244,7 @@ struct FieldInfo {
BitFieldWidth(BitFieldWidth), IsBitField(IsBitField),
IsUnnamedBitfield(IsUnnamedBitField) {}
- bool isEmpty() const;
+ LLVM_ABI bool isEmpty() const;
};
enum class StructPacking { Default, Packed, ExplicitPacking };
@@ -308,7 +308,7 @@ class RecordType : public Type {
return VirtualBaseClasses;
}
- bool isEmpty() const;
+ LLVM_ABI bool isEmpty() const;
static bool classof(const Type *T) {
return T->getKind() == TypeKind::Record;
diff --git a/llvm/include/llvm/ADT/APFloat.h b/llvm/include/llvm/ADT/APFloat.h
index 07e509baa5f1c..cf6c1276d7592 100644
--- a/llvm/include/llvm/ADT/APFloat.h
+++ b/llvm/include/llvm/ADT/APFloat.h
@@ -677,7 +677,7 @@ class IEEEFloat final {
LLVM_ABI cmpResult compareAbsoluteValue(const IEEEFloat &) const;
- APInt getNaNPayload() const;
+ LLVM_ABI APInt getNaNPayload() const;
private:
/// \name Simple Queries
@@ -925,7 +925,7 @@ class DoubleAPFloat final {
LLVM_ABI bool isLargest() const;
LLVM_ABI bool isInteger() const;
- APInt getNaNPayload() const;
+ LLVM_ABI APInt getNaNPayload() const;
LLVM_ABI void toString(SmallVectorImpl<char> &Str, unsigned FormatPrecision,
unsigned FormatMaxPadding,
@@ -1426,7 +1426,7 @@ class APFloat : public APFloatBase {
///
/// If a floating-point exception occurs during conversion, then no error is
/// returned, and the exception is indicated via opStatus.
- Expected<opStatus> convertFromString(StringRef, roundingMode);
+ LLVM_ABI Expected<opStatus> convertFromString(StringRef, roundingMode);
APInt bitcastToAPInt() const {
APFLOAT_DISPATCH_ON_SEMANTICS(bitcastToAPInt());
}
@@ -1762,7 +1762,8 @@ inline APFloat maximumnum(const APFloat &A, const APFloat &B) {
/// Implement IEEE 754-2019 exp functions
LLVM_READONLY
-APFloat exp(const APFloat &X, RoundingMode RM = APFloat::rmNearestTiesToEven);
+LLVM_ABI APFloat exp(const APFloat &X,
+ RoundingMode RM = APFloat::rmNearestTiesToEven);
inline raw_ostream &operator<<(raw_ostream &OS, const APFloat &V) {
V.print(OS);
diff --git a/llvm/include/llvm/AsmParser/LLLexer.h b/llvm/include/llvm/AsmParser/LLLexer.h
index 639fd5c06e0a6..a33e7828fb2fc 100644
--- a/llvm/include/llvm/AsmParser/LLLexer.h
+++ b/llvm/include/llvm/AsmParser/LLLexer.h
@@ -62,8 +62,8 @@ namespace llvm {
bool IgnoreColonInIdentifiers = false;
public:
- explicit LLLexer(StringRef StartBuf, SourceMgr &SM, SMDiagnostic &,
- LLVMContext &C);
+ LLVM_ABI explicit LLLexer(StringRef StartBuf, SourceMgr &SM, SMDiagnostic &,
+ LLVMContext &C);
lltok::Kind Lex() { return CurKind = LexToken(); }
@@ -101,11 +101,11 @@ namespace llvm {
}
bool ParseError(const Twine &Msg) { return ParseError(getLoc(), Msg); }
- void Warning(LocTy WarningLoc, const Twine &Msg) const;
+ LLVM_ABI void Warning(LocTy WarningLoc, const Twine &Msg) const;
void Warning(const Twine &Msg) const { return Warning(getLoc(), Msg); }
private:
- lltok::Kind LexToken();
+ LLVM_ABI lltok::Kind LexToken();
int getNextChar();
void SkipLineComment();
@@ -134,7 +134,7 @@ namespace llvm {
void FP80HexToIntPair(const char *Buffer, const char *End,
uint64_t Pair[2]);
- void Error(LocTy ErrorLoc, const Twine &Msg, ErrorPriority Origin);
+ LLVM_ABI void Error(LocTy ErrorLoc, const Twine &Msg, ErrorPriority Origin);
void LexError(LocTy ErrorLoc, const Twine &Msg) {
Error(ErrorLoc, Msg, ErrorPriority::Lexer);
diff --git a/llvm/include/llvm/AsmParser/LLParser.h b/llvm/include/llvm/AsmParser/LLParser.h
index 8eda81d13583b..788b56cb78f08 100644
--- a/llvm/include/llvm/AsmParser/LLParser.h
+++ b/llvm/include/llvm/AsmParser/LLParser.h
@@ -219,19 +219,21 @@ namespace llvm {
: Context(Context), OPLex(F, SM, Err, Context),
Lex(F, SM, Err, Context), M(M), Index(Index), Slots(Slots),
BlockAddressPFS(nullptr), ParserContext(ParserContext) {}
- bool Run(
+ LLVM_ABI bool Run(
bool UpgradeDebugInfo,
DataLayoutCallbackTy DataLayoutCallback = [](StringRef, StringRef) {
return std::nullopt;
});
- bool parseStandaloneConstantValue(Constant *&C, const SlotMapping *Slots);
+ LLVM_ABI bool parseStandaloneConstantValue(Constant *&C,
+ const SlotMapping *Slots);
- bool parseTypeAtBeginning(Type *&Ty, unsigned &Read,
- const SlotMapping *Slots);
+ LLVM_ABI bool parseTypeAtBeginning(Type *&Ty, unsigned &Read,
+ const SlotMapping *Slots);
- bool parseDIExpressionBodyAtBeginning(MDNode *&Result, unsigned &Read,
- const SlotMapping *Slots);
+ LLVM_ABI bool parseDIExpressionBodyAtBeginning(MDNode *&Result,
+ unsigned &Read,
+ const SlotMapping *Slots);
LLVMContext &getContext() { return Context; }
@@ -297,12 +299,12 @@ namespace llvm {
return false;
}
bool parseStringConstant(std::string &Result);
- bool parseUInt32(unsigned &Val);
+ LLVM_ABI bool parseUInt32(unsigned &Val);
bool parseUInt32(unsigned &Val, LocTy &Loc) {
Loc = Lex.getLoc();
return parseUInt32(Val);
}
- bool parseUInt64(uint64_t &Val);
+ LLVM_ABI bool parseUInt64(uint64_t &Val);
bool parseUInt64(uint64_t &Val, LocTy &Loc) {
Loc = Lex.getLoc();
return parseUInt64(Val);
@@ -314,14 +316,15 @@ namespace llvm {
bool parseTLSModel(GlobalVariable::ThreadLocalMode &TLM);
bool parseOptionalThreadLocal(GlobalVariable::ThreadLocalMode &TLM);
bool parseOptionalUnnamedAddr(GlobalVariable::UnnamedAddr &UnnamedAddr);
- bool parseOptionalAddrSpace(unsigned &AddrSpace, unsigned DefaultAS = 0);
+ LLVM_ABI bool parseOptionalAddrSpace(unsigned &AddrSpace,
+ unsigned DefaultAS = 0);
bool parseOptionalProgramAddrSpace(unsigned &AddrSpace) {
return parseOptionalAddrSpace(
AddrSpace, M->getDataLayout().getProgramAddressSpace());
};
bool parseEnumAttribute(Attribute::AttrKind Attr, AttrBuilder &B,
bool InAttrGroup);
- bool parseOptionalParamOrReturnAttrs(AttrBuilder &B, bool IsParam);
+ LLVM_ABI bool parseOptionalParamOrReturnAttrs(AttrBuilder &B, bool IsParam);
bool parseOptionalParamAttrs(AttrBuilder &B) {
return parseOptionalParamOrReturnAttrs(B, true);
}
@@ -361,8 +364,8 @@ namespace llvm {
bool parseAllocSizeArguments(unsigned &BaseSizeArg,
std::optional<unsigned> &HowManyArg);
bool parseVScaleRangeArguments(unsigned &MinValue, unsigned &MaxValue);
- bool parseIndexList(SmallVectorImpl<unsigned> &Indices,
- bool &AteExtraComma);
+ LLVM_ABI bool parseIndexList(SmallVectorImpl<unsigned> &Indices,
+ bool &AteExtraComma);
bool parseIndexList(SmallVectorImpl<unsigned> &Indices) {
bool AteExtraComma;
if (parseIndexList(Indices, AteExtraComma))
@@ -476,7 +479,8 @@ namespace llvm {
bool parseOptionalCallsites(std::vector<CallsiteInfo> &Callsites);
// Type Parsing.
- bool parseType(Type *&Result, const Twine &Msg, bool AllowVoid = false);
+ LLVM_ABI bool parseType(Type *&Result, const Twine &Msg,
+ bool AllowVoid = false);
bool parseType(Type *&Result, bool AllowVoid = false) {
return parseType(Result, "expected type", AllowVoid);
}
@@ -512,37 +516,38 @@ namespace llvm {
int FunctionNumber;
public:
- PerFunctionState(LLParser &p, Function &f, int functionNumber,
- ArrayRef<unsigned> UnnamedArgNums);
- ~PerFunctionState();
+ LLVM_ABI PerFunctionState(LLParser &p, Function &f, int functionNumber,
+ ArrayRef<unsigned> UnnamedArgNums);
+ LLVM_ABI ~PerFunctionState();
Function &getFunction() const { return F; }
- bool finishFunction();
+ LLVM_ABI bool finishFunction();
/// GetVal - Get a value with the specified name or ID, creating a
/// forward reference record if needed. This can return null if the value
/// exists but does not have the right type.
- Value *getVal(const std::string &Name, Type *Ty, LocTy Loc);
- Value *getVal(unsigned ID, Type *Ty, LocTy Loc);
+ LLVM_ABI Value *getVal(const std::string &Name, Type *Ty, LocTy Loc);
+ LLVM_ABI Value *getVal(unsigned ID, Type *Ty, LocTy Loc);
/// setInstName - After an instruction is parsed and inserted into its
/// basic block, this installs its name.
- bool setInstName(int NameID, const std::string &NameStr, LocTy NameLoc,
- Instruction *Inst);
+ LLVM_ABI bool setInstName(int NameID, const std::string &NameStr,
+ LocTy NameLoc, Instruction *Inst);
/// GetBB - Get a basic block with the specified name or ID, creating a
/// forward reference record if needed. This can return null if the value
/// is not a BasicBlock.
- BasicBlock *getBB(const std::string &Name, LocTy Loc);
- BasicBlock *getBB(unsigned ID, LocTy Loc);
+ LLVM_ABI BasicBlock *getBB(const std::string &Name, LocTy Loc);
+ LLVM_ABI BasicBlock *getBB(unsigned ID, LocTy Loc);
/// DefineBB - Define the specified basic block, which is either named or
/// unnamed. If there is an error, this returns null otherwise it returns
/// the block being defined.
- BasicBlock *defineBB(const std::string &Name, int NameID, LocTy Loc);
+ LLVM_ABI BasicBlock *defineBB(const std::string &Name, int NameID,
+ LocTy Loc);
- bool resolveForwardRefBlockAddresses();
+ LLVM_ABI bool resolveForwardRefBlockAddresses();
};
bool convertValIDToValue(Type *Ty, ValID &ID, Value *&V,
@@ -552,7 +557,7 @@ namespace llvm {
Value *Val);
bool parseConstantValue(Type *Ty, Constant *&C);
- bool parseValue(Type *Ty, Value *&V, PerFunctionState *PFS);
+ LLVM_ABI bool parseValue(Type *Ty, Value *&V, PerFunctionState *PFS);
bool parseValue(Type *Ty, Value *&V, PerFunctionState &PFS) {
return parseValue(Ty, V, &PFS);
}
@@ -562,7 +567,7 @@ namespace llvm {
return parseValue(Ty, V, &PFS);
}
- bool parseTypeAndValue(Value *&V, PerFunctionState *PFS);
+ LLVM_ABI bool parseTypeAndValue(Value *&V, PerFunctionState *PFS);
bool parseTypeAndValue(Value *&V, PerFunctionState &PFS) {
return parseTypeAndValue(V, &PFS);
}
@@ -570,8 +575,8 @@ namespace llvm {
Loc = Lex.getLoc();
return parseTypeAndValue(V, PFS);
}
- bool parseTypeAndBasicBlock(BasicBlock *&BB, LocTy &Loc,
- PerFunctionState &PFS);
+ LLVM_ABI bool parseTypeAndBasicBlock(BasicBlock *&BB, LocTy &Loc,
+ PerFunctionState &PFS);
bool parseTypeAndBasicBlock(BasicBlock *&BB, PerFunctionState &PFS) {
LocTy Loc;
return parseTypeAndBasicBlock(BB, Loc, PFS);
diff --git a/llvm/include/llvm/BinaryFormat/DXContainer.h b/llvm/include/llvm/BinaryFormat/DXContainer.h
index 84c822ddbd2cb..a4e45c3a2fc9c 100644
--- a/llvm/include/llvm/BinaryFormat/DXContainer.h
+++ b/llvm/include/llvm/BinaryFormat/DXContainer.h
@@ -205,7 +205,7 @@ LLVM_ABI ArrayRef<EnumEntry<RootParameterType>> getRootParameterTypes();
LLVM_ABI_FOR_TEST bool isValidParameterType(uint32_t V);
-bool isValidRangeType(uint32_t V);
+LLVM_ABI bool isValidRangeType(uint32_t V);
#define SHADER_VISIBILITY(Val, Enum) Enum = Val,
enum class ShaderVisibility : uint32_t {
@@ -214,14 +214,14 @@ enum class ShaderVisibility : uint32_t {
LLVM_ABI ArrayRef<EnumEntry<ShaderVisibility>> getShaderVisibility();
-bool isValidShaderVisibility(uint32_t V);
+LLVM_ABI bool isValidShaderVisibility(uint32_t V);
#define FILTER(Val, Enum) Enum = Val,
enum class SamplerFilter : uint32_t {
#include "DXContainerConstants.def"
};
-bool isValidSamplerFilter(uint32_t V);
+LLVM_ABI bool isValidSamplerFilter(uint32_t V);
LLVM_ABI ArrayRef<EnumEntry<SamplerFilter>> getSamplerFilters();
@@ -232,7 +232,7 @@ enum class TextureAddressMode : uint32_t {
LLVM_ABI ArrayRef<EnumEntry<TextureAddressMode>> getTextureAddressModes();
-bool isValidAddress(uint32_t V);
+LLVM_ABI bool isValidAddress(uint32_t V);
#define COMPARISON_FUNC(Val, Enum) Enum = Val,
enum class ComparisonFunc : uint32_t {
@@ -241,29 +241,29 @@ enum class ComparisonFunc : uint32_t {
LLVM_ABI ArrayRef<EnumEntry<ComparisonFunc>> getComparisonFuncs();
-bool isValidComparisonFunc(uint32_t V);
+LLVM_ABI bool isValidComparisonFunc(uint32_t V);
#define STATIC_BORDER_COLOR(Val, Enum) Enum = Val,
enum class StaticBorderColor : uint32_t {
#include "DXContainerConstants.def"
};
-bool isValidBorderColor(uint32_t V);
+LLVM_ABI bool isValidBorderColor(uint32_t V);
-bool isValidRootDesciptorFlags(uint32_t V);
+LLVM_ABI bool isValidRootDesciptorFlags(uint32_t V);
-bool isValidDescriptorRangeFlags(uint32_t V);
+LLVM_ABI bool isValidDescriptorRangeFlags(uint32_t V);
-bool isValidStaticSamplerFlags(uint32_t V);
+LLVM_ABI bool isValidStaticSamplerFlags(uint32_t V);
LLVM_ABI ArrayRef<EnumEntry<StaticBorderColor>> getStaticBorderColors();
LLVM_ABI PartType parsePartType(StringRef S);
-bool isDebugProgramPart(PartType PT);
+LLVM_ABI bool isDebugProgramPart(PartType PT);
-const char *getProgramPartName(bool IsDebug);
-bool isProgramPart(StringRef PartName);
+LLVM_ABI const char *getProgramPartName(bool IsDebug);
+LLVM_ABI bool isProgramPart(StringRef PartName);
struct VertexPSVInfo {
uint8_t OutputPositionPresent;
@@ -832,7 +832,7 @@ enum class CompilerVersionFlags : uint32_t {
LLVM_MARK_AS_BITMASK_ENUM(Internal)
};
-bool isValidCompilerVersionFlags(uint32_t V);
+LLVM_ABI bool isValidCompilerVersionFlags(uint32_t V);
struct CompilerVersionHeader {
uint16_t Major;
@@ -951,7 +951,7 @@ enum class CompressionType : uint16_t {
};
LLVM_ABI ArrayRef<EnumEntry<CompressionType>> getCompressionTypes();
-bool isValidCompressionType(uint16_t V);
+LLVM_ABI bool isValidCompressionType(uint16_t V);
struct Header {
/// Size of the section including this header. Aligned to a 4-byte boundary.
diff --git a/llvm/include/llvm/CGData/StableFunctionMap.h b/llvm/include/llvm/CGData/StableFunctionMap.h
index 96c03287df51f..50db26d31df37 100644
--- a/llvm/include/llvm/CGData/StableFunctionMap.h
+++ b/llvm/include/llvm/CGData/StableFunctionMap.h
@@ -138,7 +138,7 @@ struct StableFunctionMap {
/// map is lazily loaded, it will deserialize the entries if it is not already
/// done, other requests to the same hash at the same time will be blocked
/// until the entries are deserialized.
- const StableFunctionEntries &
+ LLVM_ABI const StableFunctionEntries &
at(HashFuncsMapType::key_type FunctionHash) const;
enum SizeType {
diff --git a/llvm/include/llvm/CodeGen/MachineInstrBundle.h b/llvm/include/llvm/CodeGen/MachineInstrBundle.h
index ad3347c41854e..2168a485a68fa 100644
--- a/llvm/include/llvm/CodeGen/MachineInstrBundle.h
+++ b/llvm/include/llvm/CodeGen/MachineInstrBundle.h
@@ -298,8 +298,8 @@ LLVM_ABI PhysRegInfo AnalyzePhysRegInBundle(const MachineInstr &MI,
class FinalizeBundleTestPass
: public RequiredPassInfoMixin<FinalizeBundleTestPass> {
public:
- PreservedAnalyses run(MachineFunction &MF,
- MachineFunctionAnalysisManager &MFAM);
+ LLVM_ABI PreservedAnalyses run(MachineFunction &MF,
+ MachineFunctionAnalysisManager &MFAM);
};
class UnpackMachineBundlesPass
diff --git a/llvm/include/llvm/CodeGen/RegAllocEvictionAdvisor.h b/llvm/include/llvm/CodeGen/RegAllocEvictionAdvisor.h
index 9f8dc0215963b..145a7219e6311 100644
--- a/llvm/include/llvm/CodeGen/RegAllocEvictionAdvisor.h
+++ b/llvm/include/llvm/CodeGen/RegAllocEvictionAdvisor.h
@@ -122,8 +122,8 @@ class RegAllocEvictionAdvisor {
LLVM_ABI bool isUnusedCalleeSavedReg(MCRegister PhysReg) const;
/// Returns true if this is an urgent eviction.
- bool isUrgentEviction(const LiveInterval &VirtReg,
- const LiveInterval &Intf) const;
+ LLVM_ABI bool isUrgentEviction(const LiveInterval &VirtReg,
+ const LiveInterval &Intf) const;
protected:
LLVM_ABI RegAllocEvictionAdvisor(const MachineFunction &MF,
diff --git a/llvm/include/llvm/CodeGenTypes/LowLevelType.h b/llvm/include/llvm/CodeGenTypes/LowLevelType.h
index c3277ba95f86f..3e1bb672081dd 100644
--- a/llvm/include/llvm/CodeGenTypes/LowLevelType.h
+++ b/llvm/include/llvm/CodeGenTypes/LowLevelType.h
@@ -708,7 +708,7 @@ class LLT {
static void setUseExtended(bool Enable) { ExtendedLLT = Enable; }
private:
- static bool ExtendedLLT;
+ LLVM_ABI static bool ExtendedLLT;
};
inline raw_ostream &operator<<(raw_ostream &OS, const LLT &Ty) {
diff --git a/llvm/include/llvm/DTLTO/DTLTO.h b/llvm/include/llvm/DTLTO/DTLTO.h
index b1e43c3e9346d..54e4a414dae2a 100644
--- a/llvm/include/llvm/DTLTO/DTLTO.h
+++ b/llvm/include/llvm/DTLTO/DTLTO.h
@@ -43,18 +43,17 @@ namespace lto {
/// set module ID to the on-disk member path; (4) for other archives and FatLTO,
/// set module ID to a unique path and serialize content in
/// serializeLTOInputs().
-class DTLTO : public LTO {
+class LLVM_ABI DTLTO : public LTO {
using Base = LTO;
public:
- LLVM_ABI DTLTO(Config Conf, unsigned ParallelCodeGenParallelismLevel,
- LTOKi...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/203267
More information about the llvm-commits
mailing list