14#ifndef LLVM_CGDATA_CODEGENDATA_H
15#define LLVM_CGDATA_CODEGENDATA_H
30#define CG_DATA_SECT_ENTRY(Kind, SectNameCommon, SectNameCoff, Prefix) Kind,
36 bool AddSegmentInfo =
true);
64 : Err(Err), Msg(ErrStr.str()) {
68 std::string
message()
const override;
82 static std::pair<cgdata_error, std::string>
take(
Error E) {
108 std::unique_ptr<OutlinedHashTree> PublishedHashTree;
118 static std::unique_ptr<CodeGenData> Instance;
119 static std::once_flag OnceFlag;
130 return PublishedHashTree && !PublishedHashTree->empty();
136 return PublishedHashTree.get();
144 PublishedHashTree = std::move(HashTree);
168void warn(
Twine Message, std::string Whence =
"", std::string Hint =
"");
172namespace IndexedCGData {
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
Module.h This file contains the declarations for the Module class.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
const std::string & getMessage() const
std::error_code convertToErrorCode() const override
Convert this error to a std::error_code.
static std::pair< cgdata_error, std::string > take(Error E)
Consume an Error and return the raw enum value contained within it, and the optional error message.
std::string message() const override
Return the error message as a string.
void log(raw_ostream &OS) const override
Print an error message to an output stream.
CGDataError(cgdata_error Err, const Twine &ErrStr=Twine())
bool emitCGData()
Returns true if we should write codegen data.
void publishOutlinedHashTree(std::unique_ptr< OutlinedHashTree > HashTree)
Publish the (globally) merged or read outlined hash tree.
bool hasOutlinedHashTree()
Returns true if we have a valid outlined hash tree.
const OutlinedHashTree * getOutlinedHashTree()
Returns the outlined hash tree.
static CodeGenData & getInstance()
Base class for user error types.
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
StringRef - Represent a constant reference to a string, i.e.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
This class implements an extremely fast bulk output stream that can only output to a stream.
void publishOutlinedHashTree(std::unique_ptr< OutlinedHashTree > HashTree)
bool hasOutlinedHashTree()
void warn(Error E, StringRef Whence="")
const OutlinedHashTree * getOutlinedHashTree()
This is an optimization pass for GlobalISel generic memory operations.
@ FunctionOutlinedHashTree
std::error_code make_error_code(BitcodeError E)
void handleAllErrors(Error E, HandlerTs &&... Handlers)
Behaves the same as handleErrors, except that by contract all errors must be handled by the given han...
const std::error_category & cgdata_category()
@ LLVM_MARK_AS_BITMASK_ENUM
std::string getCodeGenDataSectionName(CGDataSectKind CGSK, Triple::ObjectFormatType OF, bool AddSegmentInfo=true)