Skip to content
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
2 changes: 1 addition & 1 deletion llvm/include/llvm/Analysis/IR2Vec.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ enum class IR2VecKind { Symbolic, FlowAware };

namespace ir2vec {

extern llvm::cl::OptionCategory IR2VecCategory;
LLVM_ABI extern llvm::cl::OptionCategory IR2VecCategory;
LLVM_ABI extern cl::opt<float> OpcWeight;
LLVM_ABI extern cl::opt<float> TypeWeight;
LLVM_ABI extern cl::opt<float> ArgWeight;
Expand Down
26 changes: 13 additions & 13 deletions llvm/include/llvm/CodeGen/MIR2Vec.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace mir2vec {
class MIREmbedder;
class SymbolicMIREmbedder;

extern llvm::cl::OptionCategory MIR2VecCategory;
LLVM_ABI extern llvm::cl::OptionCategory MIR2VecCategory;
extern cl::opt<float> OpcWeight, CommonOperandWeight, RegOperandWeight;

using Embedding = ir2vec::Embedding;
Expand Down Expand Up @@ -154,14 +154,14 @@ class MIRVocabulary {
void buildRegisterOperandMapping();

/// Get canonical index for a machine opcode
unsigned getCanonicalOpcodeIndex(unsigned Opcode) const;
LLVM_ABI unsigned getCanonicalOpcodeIndex(unsigned Opcode) const;

/// Get index for a common (non-register) machine operand
unsigned
getCommonOperandIndex(MachineOperand::MachineOperandType OperandType) const;

/// Get index for a register machine operand
unsigned getRegisterOperandIndex(Register Reg) const;
LLVM_ABI unsigned getRegisterOperandIndex(Register Reg) const;

// Accessors for operand types
const Embedding &
Expand Down Expand Up @@ -192,7 +192,7 @@ class MIRVocabulary {

/// Get entity ID (flat index) for a common operand type
/// This is used for triplet generation
unsigned getEntityIDForCommonOperand(
LLVM_ABI unsigned getEntityIDForCommonOperand(
MachineOperand::MachineOperandType OperandType) const {
return Layout.CommonOperandBase + getCommonOperandIndex(OperandType);
}
Expand Down Expand Up @@ -221,7 +221,7 @@ class MIRVocabulary {
bool IsPhysical = true) const;

/// Get the string key for a vocabulary entry at the given position
std::string getStringKey(unsigned Pos) const;
LLVM_ABI std::string getStringKey(unsigned Pos) const;

unsigned getDimension() const { return Storage.getDimension(); }

Expand Down Expand Up @@ -268,7 +268,7 @@ class MIRVocabulary {
const TargetRegisterInfo &TRI, const MachineRegisterInfo &MRI);

/// Create a dummy vocabulary for testing purposes.
static Expected<MIRVocabulary>
LLVM_ABI static Expected<MIRVocabulary>
createDummyVocabForTest(const TargetInstrInfo &TII,
const TargetRegisterInfo &TRI,
const MachineRegisterInfo &MRI, unsigned Dim = 1);
Expand Down Expand Up @@ -302,10 +302,10 @@ class MIREmbedder {
RegOperandWeight(mir2vec::RegOperandWeight) {}

/// Function to compute embeddings.
Embedding computeEmbeddings() const;
LLVM_ABI Embedding computeEmbeddings() const;

/// Function to compute the embedding for a given machine basic block.
Embedding computeEmbeddings(const MachineBasicBlock &MBB) const;
LLVM_ABI Embedding computeEmbeddings(const MachineBasicBlock &MBB) const;

/// Function to compute the embedding for a given machine instruction.
/// Specific to the kind of embeddings being computed.
Expand All @@ -316,9 +316,9 @@ class MIREmbedder {

/// Factory method to create an Embedder object of the specified kind
/// Returns nullptr if the requested kind is not supported.
static std::unique_ptr<MIREmbedder> create(MIR2VecKind Mode,
const MachineFunction &MF,
const MIRVocabulary &Vocab);
LLVM_ABI static std::unique_ptr<MIREmbedder>
create(MIR2VecKind Mode, const MachineFunction &MF,
const MIRVocabulary &Vocab);

/// Computes and returns the embedding for a given machine instruction MI in
/// the machine function MF.
Expand Down Expand Up @@ -369,7 +369,7 @@ class MIR2VecVocabProvider {
public:
MIR2VecVocabProvider(const MachineModuleInfo &MMI) : MMI(MMI) {}

Expected<mir2vec::MIRVocabulary> getVocabulary(const Module &M);
LLVM_ABI Expected<mir2vec::MIRVocabulary> getVocabulary(const Module &M);

private:
Error readVocabulary(VocabMap &OpcVocab, VocabMap &CommonOperandVocab,
Expand Down Expand Up @@ -454,7 +454,7 @@ class MIR2VecPrinterLegacyPass : public MachineFunctionPass {
};

/// Create a machine pass that prints MIR2Vec embeddings
MachineFunctionPass *createMIR2VecPrinterLegacyPass(raw_ostream &OS);
LLVM_ABI MachineFunctionPass *createMIR2VecPrinterLegacyPass(raw_ostream &OS);

} // namespace llvm

Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/IR/DataLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ class DataLayout {
///
/// This is the amount that alloca reserves for this type. For example,
/// returns 12 or 16 for x86_fp80, depending on alignment.
TypeSize getTypeAllocSize(Type *Ty) const;
LLVM_ABI TypeSize getTypeAllocSize(Type *Ty) const;

/// Returns the offset in bits between successive objects of the
/// specified type, including alignment padding; always a multiple of 8.
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Object/SFrameParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ template <endianness E> class SFrameParser<E>::FallibleFREIterator {
uint32_t Idx, uint32_t Size, uint64_t Offset)
: Data(Data), FREType(FREType), Idx(Idx), Size(Size), Offset(Offset) {}

Error inc();
LLVM_ABI Error inc();
const FrameRowEntry &operator*() const { return FRE; }

friend bool operator==(const FallibleFREIterator &LHS,
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Support/JSON.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class Object {
LLVM_ABI const json::Array *getArray(StringRef K) const;
LLVM_ABI json::Array *getArray(StringRef K);

friend bool operator==(const Object &LHS, const Object &RHS);
friend LLVM_ABI bool operator==(const Object &LHS, const Object &RHS);
};
LLVM_ABI bool operator==(const Object &LHS, const Object &RHS);
inline bool operator!=(const Object &LHS, const Object &RHS) {
Expand Down
6 changes: 3 additions & 3 deletions llvm/include/llvm/Support/SourceMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,18 @@ class SourceMgr {

public:
/// Create new source manager without support for include files.
SourceMgr();
LLVM_ABI SourceMgr();
/// Create new source manager with the capability of finding include files
/// via the provided file system.
explicit SourceMgr(IntrusiveRefCntPtr<vfs::FileSystem> FS);
SourceMgr(const SourceMgr &) = delete;
SourceMgr &operator=(const SourceMgr &) = delete;
SourceMgr(SourceMgr &&);
SourceMgr &operator=(SourceMgr &&);
~SourceMgr();
LLVM_ABI ~SourceMgr();

IntrusiveRefCntPtr<vfs::FileSystem> getVirtualFileSystem() const;
void setVirtualFileSystem(IntrusiveRefCntPtr<vfs::FileSystem> FS);
LLVM_ABI void setVirtualFileSystem(IntrusiveRefCntPtr<vfs::FileSystem> FS);

/// Return the include directories of this source manager.
ArrayRef<std::string> getIncludeDirs() const { return IncludeDirectories; }
Expand Down
5 changes: 3 additions & 2 deletions llvm/include/llvm/Support/VirtualFileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -1116,8 +1116,9 @@ class LLVM_ABI RedirectingFileSystem
/// Collect all pairs of <virtual path, real path> entries from the
/// \p VFS. This is used by the module dependency collector to forward
/// the entries into the reproducer output VFS YAML file.
void collectVFSEntries(RedirectingFileSystem &VFS,
SmallVectorImpl<YAMLVFSEntry> &CollectedEntries);
LLVM_ABI void
collectVFSEntries(RedirectingFileSystem &VFS,
SmallVectorImpl<YAMLVFSEntry> &CollectedEntries);

class YAMLVFSWriter {
std::vector<YAMLVFSEntry> Mappings;
Expand Down
4 changes: 2 additions & 2 deletions llvm/include/llvm/Support/VirtualOutputBackend.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace llvm::vfs {
/// If virtual functions are added here, also add them to \a
/// ProxyOutputBackend.
class OutputBackend : public RefCountedBase<OutputBackend> {
virtual void anchor();
LLVM_ABI virtual void anchor();

public:
/// Get a backend that points to the same destination as this one but that
Expand All @@ -47,7 +47,7 @@ class OutputBackend : public RefCountedBase<OutputBackend> {
/// have been customized).
///
/// Thread-safe.
Expected<OutputFile>
LLVM_ABI Expected<OutputFile>
createFile(const Twine &Path,
std::optional<OutputConfig> Config = std::nullopt);

Expand Down
4 changes: 2 additions & 2 deletions llvm/include/llvm/Support/VirtualOutputBackends.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ class ProxyOutputBackend : public OutputBackend {

/// An output backend that creates files on disk, wrapping APIs in sys::fs.
class OnDiskOutputBackend : public OutputBackend {
void anchor() override;
LLVM_ABI void anchor() override;

protected:
IntrusiveRefCntPtr<OutputBackend> cloneImpl() const override {
return clone();
}

Expected<std::unique_ptr<OutputFileImpl>>
LLVM_ABI Expected<std::unique_ptr<OutputFileImpl>>
createFileImpl(StringRef Path, std::optional<OutputConfig> Config) override;

public:
Expand Down
4 changes: 2 additions & 2 deletions llvm/include/llvm/Support/VirtualOutputError.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class OutputError : public ErrorInfo<OutputError, ECError> {
void log(raw_ostream &OS) const override;

// Used by ErrorInfo::classID.
static char ID;
LLVM_ABI static char ID;

OutputError(const Twine &OutputPath, std::error_code EC)
: ErrorInfo<OutputError, ECError>(EC), OutputPath(OutputPath.str()) {
Expand Down Expand Up @@ -99,7 +99,7 @@ class TempFileOutputError : public ErrorInfo<TempFileOutputError, OutputError> {
void log(raw_ostream &OS) const override;

// Used by ErrorInfo::classID.
static char ID;
LLVM_ABI static char ID;

TempFileOutputError(const Twine &TempPath, const Twine &OutputPath,
std::error_code EC)
Expand Down
8 changes: 4 additions & 4 deletions llvm/include/llvm/Support/VirtualOutputFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ class OutputFile {
///
/// If there's an open proxy from \a createProxy(), calls \a discard() to
/// clean up temporaries followed by \a report_fatal_error().
Error keep();
LLVM_ABI Error keep();

/// Discard an output, cleaning up any temporary state. Errors if clean-up
/// fails.
///
/// If it has already been closed, calls \a report_fatal_error().
Error discard();
LLVM_ABI Error discard();

/// Discard the output when destroying it if it's still open, sending the
/// result to \a Handler.
Expand All @@ -98,7 +98,7 @@ class OutputFile {
/// producer. Errors if there's already a proxy. The proxy must be deleted
/// before calling \a keep(). The proxy will crash if it's written to after
/// calling \a discard().
Expected<std::unique_ptr<raw_pwrite_stream>> createProxy();
LLVM_ABI Expected<std::unique_ptr<raw_pwrite_stream>> createProxy();

bool hasOpenProxy() const { return OpenProxy; }

Expand Down Expand Up @@ -132,7 +132,7 @@ class OutputFile {
private:
/// Destroy \a Impl. Reports fatal error if the file is open and there's no
/// handler from \a discardOnDestroy().
void destroy();
LLVM_ABI void destroy();
OutputFile &moveFrom(OutputFile &O) {
Path = std::move(O.Path);
Impl = std::move(O.Impl);
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Transforms/IPO/InferFunctionAttrs.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Module;
/// A pass which infers function attributes from the names and signatures of
/// function declarations in a module.
struct InferFunctionAttrsPass : PassInfoMixin<InferFunctionAttrsPass> {
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
};

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class FileSystem;
/// appends globals to llvm.compiler.used.
class SanitizerCoveragePass : public PassInfoMixin<SanitizerCoveragePass> {
public:
explicit SanitizerCoveragePass(
LLVM_ABI explicit SanitizerCoveragePass(
SanitizerCoverageOptions Options = SanitizerCoverageOptions(),
IntrusiveRefCntPtr<vfs::FileSystem> VFS = nullptr,
const std::vector<std::string> &AllowlistFiles = {},
Expand Down