diff --git a/llvm/include/llvm-c/DebugInfo.h b/llvm/include/llvm-c/DebugInfo.h index 212c2e1c86a65..2ecd69a187d4d 100644 --- a/llvm/include/llvm-c/DebugInfo.h +++ b/llvm/include/llvm-c/DebugInfo.h @@ -700,7 +700,7 @@ LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateArrayType( * \param AlignInBits Set alignment. * \param BaseTy The base type of the set. */ -LLVMMetadataRef LLVMDIBuilderCreateSetType( +LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateSetType( LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, LLVMMetadataRef BaseTy); @@ -722,7 +722,7 @@ LLVMMetadataRef LLVMDIBuilderCreateSetType( * \param Stride Stride of the subrange. * \param Bias Bias of the subrange. */ -LLVMMetadataRef LLVMDIBuilderCreateSubrangeType( +LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateSubrangeType( LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, unsigned LineNo, LLVMMetadataRef File, uint64_t SizeInBits, uint32_t AlignInBits, LLVMDIFlags Flags, LLVMMetadataRef BaseTy, @@ -743,7 +743,7 @@ LLVMMetadataRef LLVMDIBuilderCreateSubrangeType( * \param Rank Rank. (DIVariable, DIExpression or NULL) * \param BitStride BitStride. */ -LLVMMetadataRef LLVMDIBuilderCreateDynamicArrayType( +LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateDynamicArrayType( LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, unsigned LineNo, LLVMMetadataRef File, uint64_t Size, uint32_t AlignInBits, LLVMMetadataRef Ty, LLVMMetadataRef *Subscripts, @@ -756,8 +756,9 @@ LLVMMetadataRef LLVMDIBuilderCreateDynamicArrayType( * * @see DIBuilder::replaceArrays() */ -void LLVMReplaceArrays(LLVMDIBuilderRef Builder, LLVMMetadataRef *T, - LLVMMetadataRef *Elements, unsigned NumElements); +LLVM_C_ABI void LLVMReplaceArrays(LLVMDIBuilderRef Builder, LLVMMetadataRef *T, + LLVMMetadataRef *Elements, + unsigned NumElements); /** * Create debugging information entry for a vector type. diff --git a/llvm/include/llvm/DWARFCFIChecker/DWARFCFIAnalysis.h b/llvm/include/llvm/DWARFCFIChecker/DWARFCFIAnalysis.h index 3803dfd4ebd20..be1025e691561 100644 --- a/llvm/include/llvm/DWARFCFIChecker/DWARFCFIAnalysis.h +++ b/llvm/include/llvm/DWARFCFIChecker/DWARFCFIAnalysis.h @@ -38,6 +38,7 @@ #include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCSubtargetInfo.h" #include "llvm/MC/TargetRegistry.h" +#include "llvm/Support/Compiler.h" namespace llvm { @@ -74,10 +75,11 @@ namespace llvm { /// checked, and in all other case(s), a warning is emitted. class DWARFCFIAnalysis { public: - DWARFCFIAnalysis(MCContext *Context, MCInstrInfo const &MCII, bool IsEH, - ArrayRef Prologue); + LLVM_ABI DWARFCFIAnalysis(MCContext *Context, MCInstrInfo const &MCII, + bool IsEH, ArrayRef Prologue); - void update(const MCInst &Inst, ArrayRef Directives); + LLVM_ABI void update(const MCInst &Inst, + ArrayRef Directives); private: void checkRegDiff(const MCInst &Inst, DWARFRegNum Reg, diff --git a/llvm/include/llvm/DWARFCFIChecker/DWARFCFIFunctionFrameAnalyzer.h b/llvm/include/llvm/DWARFCFIChecker/DWARFCFIFunctionFrameAnalyzer.h index 70caceae563f1..03e93ded1f538 100644 --- a/llvm/include/llvm/DWARFCFIChecker/DWARFCFIFunctionFrameAnalyzer.h +++ b/llvm/include/llvm/DWARFCFIChecker/DWARFCFIFunctionFrameAnalyzer.h @@ -18,6 +18,7 @@ #include "DWARFCFIFunctionFrameReceiver.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/Support/Compiler.h" namespace llvm { @@ -27,7 +28,7 @@ namespace llvm { /// emitted through the `MCContext` instance to the constructor. If a frame /// finishes without being started or if all the frames are not finished before /// this classes is destructed, the program fails through an assertion. -class CFIFunctionFrameAnalyzer : public CFIFunctionFrameReceiver { +class LLVM_ABI CFIFunctionFrameAnalyzer : public CFIFunctionFrameReceiver { public: CFIFunctionFrameAnalyzer(MCContext &Context, const MCInstrInfo &MCII) : CFIFunctionFrameReceiver(Context), MCII(MCII) {} diff --git a/llvm/include/llvm/DWARFCFIChecker/DWARFCFIFunctionFrameStreamer.h b/llvm/include/llvm/DWARFCFIChecker/DWARFCFIFunctionFrameStreamer.h index 522010033f1a8..5a3cf4ab64a1f 100644 --- a/llvm/include/llvm/DWARFCFIChecker/DWARFCFIFunctionFrameStreamer.h +++ b/llvm/include/llvm/DWARFCFIChecker/DWARFCFIFunctionFrameStreamer.h @@ -20,6 +20,7 @@ #include "llvm/MC/MCDwarf.h" #include "llvm/MC/MCInstrInfo.h" #include "llvm/MC/MCStreamer.h" +#include "llvm/Support/Compiler.h" #include #include @@ -30,7 +31,7 @@ namespace llvm { /// channels them to `CFIFunctionFrameReceiver`. A function frame is the machine /// instructions and CFI directives that are between `.cfi_startproc` and /// `.cfi_endproc` directives. -class CFIFunctionFrameStreamer : public MCStreamer { +class LLVM_ABI CFIFunctionFrameStreamer : public MCStreamer { public: CFIFunctionFrameStreamer(MCContext &Context, std::unique_ptr Receiver) diff --git a/llvm/include/llvm/DWARFCFIChecker/DWARFCFIState.h b/llvm/include/llvm/DWARFCFIChecker/DWARFCFIState.h index 363f76a043bbd..57d2a4f827ae7 100644 --- a/llvm/include/llvm/DWARFCFIChecker/DWARFCFIState.h +++ b/llvm/include/llvm/DWARFCFIChecker/DWARFCFIState.h @@ -17,6 +17,7 @@ #include "llvm/DebugInfo/DWARF/LowLevel/DWARFUnwindTable.h" #include "llvm/MC/MCContext.h" #include "llvm/MC/MCDwarf.h" +#include "llvm/Support/Compiler.h" #include namespace llvm { @@ -30,13 +31,13 @@ class DWARFCFIState { public: DWARFCFIState(MCContext *Context) : Context(Context), IsInitiated(false) {}; - std::optional getCurrentUnwindRow() const; + LLVM_ABI std::optional getCurrentUnwindRow() const; /// This method updates the state by applying \p Directive to the current /// state. If the directive is not supported by the checker or any error /// happens while applying the CFI directive, a warning or error is reported /// to the user, and the directive is ignored, leaving the state unchanged. - void update(const MCCFIInstruction &Directive); + LLVM_ABI void update(const MCCFIInstruction &Directive); private: dwarf::CFIProgram convert(MCCFIInstruction Directive); diff --git a/llvm/include/llvm/Frontend/HLSL/RootSignatureValidations.h b/llvm/include/llvm/Frontend/HLSL/RootSignatureValidations.h index e9bdcee0d72df..f1e223da95241 100644 --- a/llvm/include/llvm/Frontend/HLSL/RootSignatureValidations.h +++ b/llvm/include/llvm/Frontend/HLSL/RootSignatureValidations.h @@ -16,6 +16,7 @@ #include "llvm/ADT/IntervalMap.h" #include "llvm/Frontend/HLSL/HLSLRootSignature.h" +#include "llvm/Support/Compiler.h" namespace llvm { namespace hlsl { @@ -23,22 +24,22 @@ namespace rootsig { // Basic verification of RootElements -bool verifyRootFlag(uint32_t Flags); -bool verifyVersion(uint32_t Version); -bool verifyRegisterValue(uint32_t RegisterValue); -bool verifyRegisterSpace(uint32_t RegisterSpace); -bool verifyRootDescriptorFlag(uint32_t Version, uint32_t FlagsVal); -bool verifyRangeType(uint32_t Type); -bool verifyDescriptorRangeFlag(uint32_t Version, uint32_t Type, - uint32_t FlagsVal); -bool verifyNumDescriptors(uint32_t NumDescriptors); -bool verifySamplerFilter(uint32_t Value); -bool verifyAddress(uint32_t Address); -bool verifyMipLODBias(float MipLODBias); -bool verifyMaxAnisotropy(uint32_t MaxAnisotropy); -bool verifyComparisonFunc(uint32_t ComparisonFunc); -bool verifyBorderColor(uint32_t BorderColor); -bool verifyLOD(float LOD); +LLVM_ABI bool verifyRootFlag(uint32_t Flags); +LLVM_ABI bool verifyVersion(uint32_t Version); +LLVM_ABI bool verifyRegisterValue(uint32_t RegisterValue); +LLVM_ABI bool verifyRegisterSpace(uint32_t RegisterSpace); +LLVM_ABI bool verifyRootDescriptorFlag(uint32_t Version, uint32_t FlagsVal); +LLVM_ABI bool verifyRangeType(uint32_t Type); +LLVM_ABI bool verifyDescriptorRangeFlag(uint32_t Version, uint32_t Type, + uint32_t FlagsVal); +LLVM_ABI bool verifyNumDescriptors(uint32_t NumDescriptors); +LLVM_ABI bool verifySamplerFilter(uint32_t Value); +LLVM_ABI bool verifyAddress(uint32_t Address); +LLVM_ABI bool verifyMipLODBias(float MipLODBias); +LLVM_ABI bool verifyMaxAnisotropy(uint32_t MaxAnisotropy); +LLVM_ABI bool verifyComparisonFunc(uint32_t ComparisonFunc); +LLVM_ABI bool verifyBorderColor(uint32_t BorderColor); +LLVM_ABI bool verifyLOD(float LOD); struct RangeInfo { const static uint32_t Unbounded = ~0u; @@ -145,7 +146,7 @@ struct OverlappingRanges { /// A: Insert the current RangeInfo into the corresponding Visibility /// ResourceRange /// B: Check for overlap with any overlapping Visibility ResourceRange -llvm::SmallVector +LLVM_ABI llvm::SmallVector findOverlappingRanges(ArrayRef Infos); } // namespace rootsig diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.h b/llvm/include/llvm/IR/RuntimeLibcalls.h index 97a6389844439..162b0fa7d2e9b 100644 --- a/llvm/include/llvm/IR/RuntimeLibcalls.h +++ b/llvm/include/llvm/IR/RuntimeLibcalls.h @@ -147,7 +147,7 @@ struct RuntimeLibcallsInfo { LLVM_ABI static const char *const LibCallImplNames[RTLIB::NumLibcallImpls]; /// Map from a concrete LibcallImpl implementation to its RTLIB::Libcall kind. - static const RTLIB::Libcall ImplToLibcall[RTLIB::NumLibcallImpls]; + LLVM_ABI static const RTLIB::Libcall ImplToLibcall[RTLIB::NumLibcallImpls]; static bool darwinHasSinCosStret(const Triple &TT) { if (!TT.isOSDarwin()) diff --git a/llvm/include/llvm/Target/RegisterTargetPassConfigCallback.h b/llvm/include/llvm/Target/RegisterTargetPassConfigCallback.h index d7c9cb21e15d4..7020cef7cad7b 100644 --- a/llvm/include/llvm/Target/RegisterTargetPassConfigCallback.h +++ b/llvm/include/llvm/Target/RegisterTargetPassConfigCallback.h @@ -15,6 +15,7 @@ #define LLVM_TARGET_REGISTERTARGETPASSCONFIGCALLBACK_H #include "TargetMachine.h" +#include "llvm/Support/Compiler.h" namespace llvm { @@ -25,13 +26,13 @@ class RegisterTargetPassConfigCallback { public: PassConfigCallback Callback; - explicit RegisterTargetPassConfigCallback(PassConfigCallback &&C); - ~RegisterTargetPassConfigCallback(); + LLVM_ABI explicit RegisterTargetPassConfigCallback(PassConfigCallback &&C); + LLVM_ABI ~RegisterTargetPassConfigCallback(); }; -void invokeGlobalTargetPassConfigCallbacks(TargetMachine &TM, - PassManagerBase &PM, - TargetPassConfig *PassConfig); +LLVM_ABI void +invokeGlobalTargetPassConfigCallbacks(TargetMachine &TM, PassManagerBase &PM, + TargetPassConfig *PassConfig); } // namespace llvm #endif // LLVM_TARGET_REGISTERTARGETPASSCONFIGCALLBACK_H