15 #ifndef LLVM_IR_LLVMCONTEXT_H
16 #define LLVM_IR_LLVMCONTEXT_H
31 class LLVMContextImpl;
34 template <
typename T>
class SmallVectorImpl;
156 void *DiagContext =
nullptr);
175 void *DiagContext =
nullptr,
176 bool RespectFilters =
false);
258 template <
typename ValT,
typename Base, ValT(Base::*Mem)>
275 void removeModule(
Module*);
293 #endif // LLVM_IR_LLVMCONTEXT_H
LLVMContext & operator=(const LLVMContext &)=delete
void setDiagnosticsOutputFile(std::unique_ptr< yaml::Output > F)
Set the diagnostics output file used for optimization diagnostics.
InlineAsmDiagHandlerTy getInlineAsmDiagnosticHandler() const
getInlineAsmDiagnosticHandler - Return the diagnostic handler set by setInlineAsmDiagnosticHandler.
A Module instance is used to store all the information related to an LLVM module. ...
const std::string & getGC(const Function &Fn)
Return the GC for a function.
void(* DiagnosticHandlerTy)(const DiagnosticInfo &DI, void *Context)
Defines the type of a diagnostic handler.
bool shouldDiscardValueNames() const
Return true if the Context runtime configuration is set to discard all value names.
DiagnosticHandlerTy getDiagnosticHandler() const
getDiagnosticHandler - Return the diagnostic handler set by setDiagnosticHandler. ...
void setGC(const Function &Fn, std::string GCName)
Define the GC for a function.
void enableDebugTypeODRUniquing()
void setInlineAsmDiagnosticHandler(InlineAsmDiagHandlerTy DiagHandler, void *DiagContext=nullptr)
setInlineAsmDiagnosticHandler - This method sets a handler that is invoked when problems with inline ...
void setYieldCallback(YieldCallbackTy Callback, void *OpaqueHandle)
Registers a yield callback with the given context.
void yield()
Calls the yield callback (if applicable).
void setDiscardValueNames(bool Discard)
Set the Context runtime configuration to discard all value name (but GlobalValue).
void disableDebugTypeODRUniquing()
bool isODRUniquingDebugTypes() const
Whether there is a string map for uniquing debug info identifiers across the context.
DiagnosticSeverity
Defines the different supported severity of a diagnostic.
#define DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref)
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Attribute unwrap(LLVMAttributeRef Attr)
void setDiagnosticHotnessRequested(bool Requested)
Set if a code hotness metric should be included in optimization diagnostics.
void deleteGC(const Function &Fn)
Remove the GC for a function.
void emitError(unsigned LocCookie, const Twine &ErrorStr)
emitError - Emit an error message to the currently installed error handler with optional location inf...
static OptionRegistry & instance()
Returns a reference to the singleton instance.
struct LLVMOpaqueContext * LLVMContextRef
The top-level container for all LLVM global data.
yaml::Output * getDiagnosticsOutputFile()
Return the YAML file used by the backend to save optimization diagnostics.
void getMDKindNames(SmallVectorImpl< StringRef > &Result) const
getMDKindNames - Populate client supplied SmallVector with the name for custom metadata IDs registere...
This class implements a mechanism to disable passes and individual optimizations at compile time base...
This is the base abstract class for diagnostic reporting in the backend.
This is an important class for using LLVM in a threaded context.
ValT getOption() const
Query for a debug option's value.
unsigned getMDKindID(StringRef Name) const
getMDKindID - Return a unique non-zero ID for the specified metadata kind.
void * getDiagnosticContext() const
getDiagnosticContext - Return the diagnostic context set by setDiagnosticContext. ...
The Output class is used to generate a yaml document from in-memory structs and vectors.
bool getDiagnosticHotnessRequested() const
Return if a code hotness metric should be included in optimization diagnostics.
LLVMContextImpl *const pImpl
void getOperandBundleTags(SmallVectorImpl< StringRef > &Result) const
getOperandBundleTags - Populate client supplied SmallVector with the bundle tags registered in this L...
This file declares helper objects for defining debug options that can be configured via the command l...
static const char * getDiagnosticMessagePrefix(DiagnosticSeverity Severity)
Get the prefix that should be printed in front of a diagnostic of the given Severity.
void(* InlineAsmDiagHandlerTy)(const SMDiagnostic &, void *Context, unsigned LocCookie)
void * getInlineAsmDiagnosticContext() const
getInlineAsmDiagnosticContext - Return the diagnostic context set by setInlineAsmDiagnosticHandler.
LLVMAttributeRef wrap(Attribute Attr)
OptBisect & getOptBisect()
Access the object which manages optimization bisection for failure analysis.
uint32_t getOperandBundleTagID(StringRef Tag) const
getOperandBundleTagID - Maps a bundle tag to an integer ID.
void diagnose(const DiagnosticInfo &DI)
Report a message to the currently installed diagnostic handler.
void setDiagnosticHandler(DiagnosticHandlerTy DiagHandler, void *DiagContext=nullptr, bool RespectFilters=false)
setDiagnosticHandler - This method sets a handler that is invoked when the backend needs to report an...
void(* YieldCallbackTy)(LLVMContext *Context, void *OpaqueHandle)
Defines the type of a yield callback.
StringRef - Represent a constant reference to a string, i.e.
Instances of this class encapsulate one diagnostic report, allowing printing to a raw_ostream as a ca...