Skip to content

Commit 90687a1

Browse files
committed
[llvm] annotate new llvm symbols for DLL export
1 parent e10db15 commit 90687a1

File tree

8 files changed

+36
-30
lines changed

8 files changed

+36
-30
lines changed

llvm/include/llvm-c/DebugInfo.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateArrayType(
700700
* \param AlignInBits Set alignment.
701701
* \param BaseTy The base type of the set.
702702
*/
703-
LLVMMetadataRef LLVMDIBuilderCreateSetType(
703+
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateSetType(
704704
LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
705705
size_t NameLen, LLVMMetadataRef File, unsigned LineNumber,
706706
uint64_t SizeInBits, uint32_t AlignInBits, LLVMMetadataRef BaseTy);
@@ -722,7 +722,7 @@ LLVMMetadataRef LLVMDIBuilderCreateSetType(
722722
* \param Stride Stride of the subrange.
723723
* \param Bias Bias of the subrange.
724724
*/
725-
LLVMMetadataRef LLVMDIBuilderCreateSubrangeType(
725+
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateSubrangeType(
726726
LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
727727
size_t NameLen, unsigned LineNo, LLVMMetadataRef File, uint64_t SizeInBits,
728728
uint32_t AlignInBits, LLVMDIFlags Flags, LLVMMetadataRef BaseTy,
@@ -743,7 +743,7 @@ LLVMMetadataRef LLVMDIBuilderCreateSubrangeType(
743743
* \param Rank Rank. (DIVariable, DIExpression or NULL)
744744
* \param BitStride BitStride.
745745
*/
746-
LLVMMetadataRef LLVMDIBuilderCreateDynamicArrayType(
746+
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateDynamicArrayType(
747747
LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
748748
size_t NameLen, unsigned LineNo, LLVMMetadataRef File, uint64_t Size,
749749
uint32_t AlignInBits, LLVMMetadataRef Ty, LLVMMetadataRef *Subscripts,
@@ -756,7 +756,7 @@ LLVMMetadataRef LLVMDIBuilderCreateDynamicArrayType(
756756
*
757757
* @see DIBuilder::replaceArrays()
758758
*/
759-
void LLVMReplaceArrays(LLVMDIBuilderRef Builder, LLVMMetadataRef *T,
759+
LLVM_C_ABI void LLVMReplaceArrays(LLVMDIBuilderRef Builder, LLVMMetadataRef *T,
760760
LLVMMetadataRef *Elements, unsigned NumElements);
761761

762762
/**

llvm/include/llvm/DWARFCFIChecker/DWARFCFIAnalysis.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#ifndef LLVM_DWARFCFICHECKER_DWARFCFIANALYSIS_H
2525
#define LLVM_DWARFCFICHECKER_DWARFCFIANALYSIS_H
2626

27+
#include "llvm/Support/Compiler.h"
2728
#include "DWARFCFIState.h"
2829
#include "llvm/ADT/ArrayRef.h"
2930
#include "llvm/ADT/SmallSet.h"
@@ -74,10 +75,10 @@ namespace llvm {
7475
/// checked, and in all other case(s), a warning is emitted.
7576
class DWARFCFIAnalysis {
7677
public:
77-
DWARFCFIAnalysis(MCContext *Context, MCInstrInfo const &MCII, bool IsEH,
78+
LLVM_ABI DWARFCFIAnalysis(MCContext *Context, MCInstrInfo const &MCII, bool IsEH,
7879
ArrayRef<MCCFIInstruction> Prologue);
7980

80-
void update(const MCInst &Inst, ArrayRef<MCCFIInstruction> Directives);
81+
LLVM_ABI void update(const MCInst &Inst, ArrayRef<MCCFIInstruction> Directives);
8182

8283
private:
8384
void checkRegDiff(const MCInst &Inst, DWARFRegNum Reg,

llvm/include/llvm/DWARFCFIChecker/DWARFCFIFunctionFrameAnalyzer.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#ifndef LLVM_DWARFCFICHECKER_DWARFCFIFUNCTIONFRAMEANALYZER_H
1515
#define LLVM_DWARFCFICHECKER_DWARFCFIFUNCTIONFRAMEANALYZER_H
1616

17+
#include "llvm/Support/Compiler.h"
1718
#include "DWARFCFIAnalysis.h"
1819
#include "DWARFCFIFunctionFrameReceiver.h"
1920
#include "llvm/ADT/ArrayRef.h"
@@ -27,7 +28,7 @@ namespace llvm {
2728
/// emitted through the `MCContext` instance to the constructor. If a frame
2829
/// finishes without being started or if all the frames are not finished before
2930
/// this classes is destructed, the program fails through an assertion.
30-
class CFIFunctionFrameAnalyzer : public CFIFunctionFrameReceiver {
31+
class LLVM_ABI CFIFunctionFrameAnalyzer : public CFIFunctionFrameReceiver {
3132
public:
3233
CFIFunctionFrameAnalyzer(MCContext &Context, const MCInstrInfo &MCII)
3334
: CFIFunctionFrameReceiver(Context), MCII(MCII) {}

llvm/include/llvm/DWARFCFIChecker/DWARFCFIFunctionFrameStreamer.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#ifndef LLVM_DWARFCFICHECKER_DWARFCFIFUNCTIONFRAMESTREAMER_H
1515
#define LLVM_DWARFCFICHECKER_DWARFCFIFUNCTIONFRAMESTREAMER_H
1616

17+
#include "llvm/Support/Compiler.h"
1718
#include "DWARFCFIFunctionFrameReceiver.h"
1819
#include "llvm/ADT/SmallVector.h"
1920
#include "llvm/MC/MCContext.h"
@@ -30,7 +31,7 @@ namespace llvm {
3031
/// channels them to `CFIFunctionFrameReceiver`. A function frame is the machine
3132
/// instructions and CFI directives that are between `.cfi_startproc` and
3233
/// `.cfi_endproc` directives.
33-
class CFIFunctionFrameStreamer : public MCStreamer {
34+
class LLVM_ABI CFIFunctionFrameStreamer : public MCStreamer {
3435
public:
3536
CFIFunctionFrameStreamer(MCContext &Context,
3637
std::unique_ptr<CFIFunctionFrameReceiver> Receiver)

llvm/include/llvm/DWARFCFIChecker/DWARFCFIState.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#ifndef LLVM_DWARFCFICHECKER_UNWINDINFOSTATE_H
1515
#define LLVM_DWARFCFICHECKER_UNWINDINFOSTATE_H
1616

17+
#include "llvm/Support/Compiler.h"
1718
#include "llvm/DebugInfo/DWARF/LowLevel/DWARFUnwindTable.h"
1819
#include "llvm/MC/MCContext.h"
1920
#include "llvm/MC/MCDwarf.h"
@@ -30,13 +31,13 @@ class DWARFCFIState {
3031
public:
3132
DWARFCFIState(MCContext *Context) : Context(Context), IsInitiated(false) {};
3233

33-
std::optional<dwarf::UnwindRow> getCurrentUnwindRow() const;
34+
LLVM_ABI std::optional<dwarf::UnwindRow> getCurrentUnwindRow() const;
3435

3536
/// This method updates the state by applying \p Directive to the current
3637
/// state. If the directive is not supported by the checker or any error
3738
/// happens while applying the CFI directive, a warning or error is reported
3839
/// to the user, and the directive is ignored, leaving the state unchanged.
39-
void update(const MCCFIInstruction &Directive);
40+
LLVM_ABI void update(const MCCFIInstruction &Directive);
4041

4142
private:
4243
dwarf::CFIProgram convert(MCCFIInstruction Directive);

llvm/include/llvm/Frontend/HLSL/RootSignatureValidations.h

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#ifndef LLVM_FRONTEND_HLSL_ROOTSIGNATUREVALIDATIONS_H
1515
#define LLVM_FRONTEND_HLSL_ROOTSIGNATUREVALIDATIONS_H
1616

17+
#include "llvm/Support/Compiler.h"
1718
#include "llvm/ADT/IntervalMap.h"
1819
#include "llvm/Frontend/HLSL/HLSLRootSignature.h"
1920

@@ -23,22 +24,22 @@ namespace rootsig {
2324

2425
// Basic verification of RootElements
2526

26-
bool verifyRootFlag(uint32_t Flags);
27-
bool verifyVersion(uint32_t Version);
28-
bool verifyRegisterValue(uint32_t RegisterValue);
29-
bool verifyRegisterSpace(uint32_t RegisterSpace);
30-
bool verifyRootDescriptorFlag(uint32_t Version, uint32_t FlagsVal);
31-
bool verifyRangeType(uint32_t Type);
32-
bool verifyDescriptorRangeFlag(uint32_t Version, uint32_t Type,
27+
LLVM_ABI bool verifyRootFlag(uint32_t Flags);
28+
LLVM_ABI bool verifyVersion(uint32_t Version);
29+
LLVM_ABI bool verifyRegisterValue(uint32_t RegisterValue);
30+
LLVM_ABI bool verifyRegisterSpace(uint32_t RegisterSpace);
31+
LLVM_ABI bool verifyRootDescriptorFlag(uint32_t Version, uint32_t FlagsVal);
32+
LLVM_ABI bool verifyRangeType(uint32_t Type);
33+
LLVM_ABI bool verifyDescriptorRangeFlag(uint32_t Version, uint32_t Type,
3334
uint32_t FlagsVal);
34-
bool verifyNumDescriptors(uint32_t NumDescriptors);
35-
bool verifySamplerFilter(uint32_t Value);
36-
bool verifyAddress(uint32_t Address);
37-
bool verifyMipLODBias(float MipLODBias);
38-
bool verifyMaxAnisotropy(uint32_t MaxAnisotropy);
39-
bool verifyComparisonFunc(uint32_t ComparisonFunc);
40-
bool verifyBorderColor(uint32_t BorderColor);
41-
bool verifyLOD(float LOD);
35+
LLVM_ABI bool verifyNumDescriptors(uint32_t NumDescriptors);
36+
LLVM_ABI bool verifySamplerFilter(uint32_t Value);
37+
LLVM_ABI bool verifyAddress(uint32_t Address);
38+
LLVM_ABI bool verifyMipLODBias(float MipLODBias);
39+
LLVM_ABI bool verifyMaxAnisotropy(uint32_t MaxAnisotropy);
40+
LLVM_ABI bool verifyComparisonFunc(uint32_t ComparisonFunc);
41+
LLVM_ABI bool verifyBorderColor(uint32_t BorderColor);
42+
LLVM_ABI bool verifyLOD(float LOD);
4243

4344
struct RangeInfo {
4445
const static uint32_t Unbounded = ~0u;
@@ -145,7 +146,7 @@ struct OverlappingRanges {
145146
/// A: Insert the current RangeInfo into the corresponding Visibility
146147
/// ResourceRange
147148
/// B: Check for overlap with any overlapping Visibility ResourceRange
148-
llvm::SmallVector<OverlappingRanges>
149+
LLVM_ABI llvm::SmallVector<OverlappingRanges>
149150
findOverlappingRanges(ArrayRef<RangeInfo> Infos);
150151

151152
} // namespace rootsig

llvm/include/llvm/IR/RuntimeLibcalls.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ struct RuntimeLibcallsInfo {
147147
LLVM_ABI static const char *const LibCallImplNames[RTLIB::NumLibcallImpls];
148148

149149
/// Map from a concrete LibcallImpl implementation to its RTLIB::Libcall kind.
150-
static const RTLIB::Libcall ImplToLibcall[RTLIB::NumLibcallImpls];
150+
LLVM_ABI static const RTLIB::Libcall ImplToLibcall[RTLIB::NumLibcallImpls];
151151

152152
static bool darwinHasSinCosStret(const Triple &TT) {
153153
if (!TT.isOSDarwin())

llvm/include/llvm/Target/RegisterTargetPassConfigCallback.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#ifndef LLVM_TARGET_REGISTERTARGETPASSCONFIGCALLBACK_H
1515
#define LLVM_TARGET_REGISTERTARGETPASSCONFIGCALLBACK_H
1616

17+
#include "llvm/Support/Compiler.h"
1718
#include "TargetMachine.h"
1819

1920
namespace llvm {
@@ -25,11 +26,11 @@ class RegisterTargetPassConfigCallback {
2526
public:
2627
PassConfigCallback Callback;
2728

28-
explicit RegisterTargetPassConfigCallback(PassConfigCallback &&C);
29-
~RegisterTargetPassConfigCallback();
29+
LLVM_ABI explicit RegisterTargetPassConfigCallback(PassConfigCallback &&C);
30+
LLVM_ABI ~RegisterTargetPassConfigCallback();
3031
};
3132

32-
void invokeGlobalTargetPassConfigCallbacks(TargetMachine &TM,
33+
LLVM_ABI void invokeGlobalTargetPassConfigCallbacks(TargetMachine &TM,
3334
PassManagerBase &PM,
3435
TargetPassConfig *PassConfig);
3536
} // namespace llvm

0 commit comments

Comments
 (0)