LLVM
15.0.0git
|
#include "llvm/Remarks/RemarkLinker.h"
Public Types | |
using | iterator = pointee_iterator< decltype(Remarks)::const_iterator > |
Return a collection of the linked unique remarks to iterate on. More... | |
Public Member Functions | |
void | setExternalFilePrependPath (StringRef PrependPath) |
Set a path to prepend to the external file path. More... | |
Error | link (StringRef Buffer, Optional< Format > RemarkFormat=None) |
Link the remarks found in Buffer . More... | |
Error | link (const object::ObjectFile &Obj, Optional< Format > RemarkFormat=None) |
Link the remarks found in Obj by looking for the right section and calling the method above. More... | |
Error | serialize (raw_ostream &OS, Format RemarksFormat) const |
Serialize the linked remarks to the stream OS , using the format RemarkFormat . More... | |
bool | empty () const |
Check whether there are any remarks linked. More... | |
iterator_range< iterator > | remarks () const |
Definition at line 31 of file RemarkLinker.h.
using llvm::remarks::RemarkLinker::iterator = pointee_iterator<decltype(Remarks)::const_iterator> |
Return a collection of the linked unique remarks to iterate on.
Ex: for (const Remark &R : RL.remarks() { [...] }
Definition at line 87 of file RemarkLinker.h.
|
inline |
Check whether there are any remarks linked.
Definition at line 82 of file RemarkLinker.h.
References Remarks.
Error RemarkLinker::link | ( | const object::ObjectFile & | Obj, |
Optional< Format > | RemarkFormat = None |
||
) |
Link the remarks found in Obj
by looking for the right section and calling the method above.
Definition at line 107 of file RemarkLinker.cpp.
References llvm::remarks::getRemarksSectionContents(), link(), llvm::ARMBuildAttrs::Section, llvm::Error::success(), and llvm::Expected< T >::takeError().
Link the remarks found in Buffer
.
If RemarkFormat
is not provided, try to deduce it from the metadata in Buffer
. Buffer
can be either a standalone remark container or just metadata. This takes care of uniquing and merging the remarks.
Definition at line 71 of file RemarkLinker.cpp.
References assert(), llvm::consumeError(), llvm::remarks::createRemarkParserFromMeta(), E, llvm::remarks::magicToFormat(), move, llvm::remarks::RemarkParser::next(), None, shouldKeepRemark(), llvm::Error::success(), and llvm::Expected< T >::takeError().
Referenced by link().
|
inline |
Error RemarkLinker::serialize | ( | raw_ostream & | OS, |
Format | RemarksFormat | ||
) | const |
Serialize the linked remarks to the stream OS
, using the format RemarkFormat
.
This clears internal state such as the string table. Note: this implies that the serialization mode is standalone.
Definition at line 118 of file RemarkLinker.cpp.
References llvm::remarks::createRemarkSerializer(), move, llvm::RISCVFenceField::R, remarks(), llvm::RemarksFormat, llvm::remarks::Standalone, llvm::Error::success(), and llvm::Expected< T >::takeError().
void RemarkLinker::setExternalFilePrependPath | ( | StringRef | PrependPath | ) |
Set a path to prepend to the external file path.
Definition at line 64 of file RemarkLinker.cpp.