struct RemarkLinker

Declaration

struct RemarkLinker { /* full declaration omitted */ };

Declared at: llvm/include/llvm/Remarks/RemarkLinker.h:27

Method Overview

  • public bool empty() const
  • public llvm::Error link(llvm::StringRef Buffer, Optional<llvm::remarks::Format> RemarkFormat = None)
  • public llvm::Error link(const object::ObjectFile & Obj, Optional<llvm::remarks::Format> RemarkFormat = None)
  • public iterator_range<llvm::remarks::RemarkLinker::iterator> remarks() const
  • public llvm::Error serialize(llvm::raw_ostream & OS, llvm::remarks::Format RemarksFormat) const
  • public void setExternalFilePrependPath(llvm::StringRef PrependPath)

Methods

bool empty() const

Description

Check whether there are any remarks linked.

Declared at: llvm/include/llvm/Remarks/RemarkLinker.h:78

llvm::Error link(llvm::StringRef Buffer,
                 Optional<llvm::remarks::Format>
                     RemarkFormat = None)

Description

Link the remarks found in \p Buffer. If \p RemarkFormat is not provided, try to deduce it from the metadata in\p Buffer. \p Buffer can be either a standalone remark container or just metadata. This takes care of uniquing and merging the remarks.

Declared at: llvm/include/llvm/Remarks/RemarkLinker.h:64

Parameters

llvm::StringRef Buffer
Optional<llvm::remarks::Format> RemarkFormat = None

llvm::Error link(const object::ObjectFile& Obj,
                 Optional<llvm::remarks::Format>
                     RemarkFormat = None)

Description

Link the remarks found in \p Obj by looking for the right section and calling the method above.

Declared at: llvm/include/llvm/Remarks/RemarkLinker.h:68

Parameters

const object::ObjectFile& Obj
Optional<llvm::remarks::Format> RemarkFormat = None

iterator_range<
    llvm::remarks::RemarkLinker::iterator>
remarks() const

Declared at: llvm/include/llvm/Remarks/RemarkLinker.h:86

llvm::Error serialize(
    llvm::raw_ostream& OS,
    llvm::remarks::Format RemarksFormat) const

Description

Serialize the linked remarks to the stream \p OS, using the format \p RemarkFormat. This clears internal state such as the string table. Note: this implies that the serialization mode is standalone.

Declared at: llvm/include/llvm/Remarks/RemarkLinker.h:75

Parameters

llvm::raw_ostream& OS
llvm::remarks::Format RemarksFormat

void setExternalFilePrependPath(
    llvm::StringRef PrependPath)

Description

Set a path to prepend to the external file path.

Declared at: llvm/include/llvm/Remarks/RemarkLinker.h:57

Parameters

llvm::StringRef PrependPath