Skip to content

Commit 3b33cba

Browse files
committed
[llvm] annotate interfaces in Target library for DLL export
1 parent 329dfa1 commit 3b33cba

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

llvm/include/llvm/Target/CGPassBuilderOption.h

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

17+
#include "llvm/Support/Compiler.h"
1718
#include "llvm/Support/CommandLine.h"
1819
#include "llvm/Target/TargetOptions.h"
1920
#include <optional>
@@ -82,7 +83,7 @@ struct CGPassBuilderOption {
8283
std::optional<bool> DebugifyCheckAndStripAll;
8384
};
8485

85-
CGPassBuilderOption getCGPassBuilderOption();
86+
LLVM_ABI CGPassBuilderOption getCGPassBuilderOption();
8687

8788
} // namespace llvm
8889

llvm/include/llvm/Target/TargetLoweringObjectFile.h

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

17+
#include "llvm/Support/Compiler.h"
1718
#include "llvm/MC/MCObjectFileInfo.h"
1819
#include "llvm/MC/MCRegister.h"
1920
#include <cstdint>
@@ -43,7 +44,7 @@ class StringRef;
4344
class TargetMachine;
4445
class DSOLocalEquivalent;
4546

46-
class TargetLoweringObjectFile : public MCObjectFileInfo {
47+
class LLVM_ABI TargetLoweringObjectFile : public MCObjectFileInfo {
4748
/// Name-mangler for global names.
4849
Mangler *Mang = nullptr;
4950

llvm/include/llvm/Target/TargetMachine.h

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

16+
#include "llvm/Support/Compiler.h"
1617
#include "llvm/ADT/StringRef.h"
1718
#include "llvm/IR/DataLayout.h"
1819
#include "llvm/IR/PassManager.h"
@@ -28,7 +29,7 @@
2829
#include <string>
2930
#include <utility>
3031

31-
extern llvm::cl::opt<bool> NoKernelInfoEndLTO;
32+
extern LLVM_ABI llvm::cl::opt<bool> NoKernelInfoEndLTO;
3233

3334
namespace llvm {
3435

@@ -78,7 +79,7 @@ struct MachineFunctionInfo;
7879
/// machine. All target-specific information should be accessible through this
7980
/// interface.
8081
///
81-
class TargetMachine {
82+
class LLVM_ABI TargetMachine {
8283
protected: // Can only create subclasses.
8384
TargetMachine(const Target &T, StringRef DataLayoutString,
8485
const Triple &TargetTriple, StringRef CPU, StringRef FS,

llvm/include/llvm/Target/TargetOptions.h

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

17+
#include "llvm/Support/Compiler.h"
1718
#include "llvm/ADT/FloatingPointMode.h"
1819
#include "llvm/MC/MCTargetOptions.h"
1920

@@ -158,12 +159,12 @@ class TargetOptions {
158159

159160
/// DisableFramePointerElim - This returns true if frame pointer elimination
160161
/// optimization should be disabled for the given machine function.
161-
bool DisableFramePointerElim(const MachineFunction &MF) const;
162+
LLVM_ABI bool DisableFramePointerElim(const MachineFunction &MF) const;
162163

163164
/// FramePointerIsReserved - This returns true if the frame pointer must
164165
/// always either point to a new frame record or be un-modified in the given
165166
/// function.
166-
bool FramePointerIsReserved(const MachineFunction &MF) const;
167+
LLVM_ABI bool FramePointerIsReserved(const MachineFunction &MF) const;
167168

168169
/// If greater than 0, override the default value of
169170
/// MCAsmInfo::BinutilsVersion.
@@ -219,7 +220,7 @@ class TargetOptions {
219220
/// truncations). If this is enabled (set to true), the code generator must
220221
/// assume that the rounding mode may dynamically change.
221222
unsigned HonorSignDependentRoundingFPMathOption : 1;
222-
bool HonorSignDependentRoundingFPMath() const;
223+
LLVM_ABI bool HonorSignDependentRoundingFPMath() const;
223224

224225
/// NoZerosInBSS - By default some codegens place zero-initialized data to
225226
/// .bss section. This flag disables such behaviour (necessary, e.g. for
@@ -346,7 +347,7 @@ class TargetOptions {
346347
unsigned EnableDebugEntryValues : 1;
347348
/// NOTE: There are targets that still do not support the debug entry values
348349
/// production.
349-
bool ShouldEmitDebugEntryValues() const;
350+
LLVM_ABI bool ShouldEmitDebugEntryValues() const;
350351

351352
// When set to true, use experimental new debug variable location tracking,
352353
// which seeks to follow the values of variables rather than their location,
@@ -450,7 +451,7 @@ class TargetOptions {
450451

451452
DenormalMode getRawFP32DenormalMode() const { return FP32DenormalMode; }
452453

453-
DenormalMode getDenormalMode(const fltSemantics &FPType) const;
454+
LLVM_ABI DenormalMode getDenormalMode(const fltSemantics &FPType) const;
454455

455456
/// What exception model to use
456457
ExceptionHandling ExceptionModel = ExceptionHandling::None;

0 commit comments

Comments
 (0)