Skip to content

[llvm] annotate new symbols for DLL export #148658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions llvm/include/llvm-c/DebugInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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.
Expand Down
8 changes: 5 additions & 3 deletions llvm/include/llvm/DWARFCFIChecker/DWARFCFIAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down Expand Up @@ -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<MCCFIInstruction> Prologue);
LLVM_ABI DWARFCFIAnalysis(MCContext *Context, MCInstrInfo const &MCII,
bool IsEH, ArrayRef<MCCFIInstruction> Prologue);

void update(const MCInst &Inst, ArrayRef<MCCFIInstruction> Directives);
LLVM_ABI void update(const MCInst &Inst,
ArrayRef<MCCFIInstruction> Directives);

private:
void checkRegDiff(const MCInst &Inst, DWARFRegNum Reg,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "DWARFCFIFunctionFrameReceiver.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Compiler.h"

namespace llvm {

Expand All @@ -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) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <memory>
#include <optional>

Expand All @@ -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<CFIFunctionFrameReceiver> Receiver)
Expand Down
5 changes: 3 additions & 2 deletions llvm/include/llvm/DWARFCFIChecker/DWARFCFIState.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <optional>

namespace llvm {
Expand All @@ -30,13 +31,13 @@ class DWARFCFIState {
public:
DWARFCFIState(MCContext *Context) : Context(Context), IsInitiated(false) {};

std::optional<dwarf::UnwindRow> getCurrentUnwindRow() const;
LLVM_ABI std::optional<dwarf::UnwindRow> 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);
Expand Down
35 changes: 18 additions & 17 deletions llvm/include/llvm/Frontend/HLSL/RootSignatureValidations.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,30 @@

#include "llvm/ADT/IntervalMap.h"
#include "llvm/Frontend/HLSL/HLSLRootSignature.h"
#include "llvm/Support/Compiler.h"

namespace llvm {
namespace hlsl {
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;
Expand Down Expand Up @@ -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<OverlappingRanges>
LLVM_ABI llvm::SmallVector<OverlappingRanges>
findOverlappingRanges(ArrayRef<RangeInfo> Infos);

} // namespace rootsig
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/IR/RuntimeLibcalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
11 changes: 6 additions & 5 deletions llvm/include/llvm/Target/RegisterTargetPassConfigCallback.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#define LLVM_TARGET_REGISTERTARGETPASSCONFIGCALLBACK_H

#include "TargetMachine.h"
#include "llvm/Support/Compiler.h"

namespace llvm {

Expand All @@ -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
Loading