14 #ifndef LLVM_IR_LLVMCONTEXT_H 15 #define LLVM_IR_LLVMCONTEXT_H 31 class LLVMContextImpl;
34 template <
typename T>
class SmallVectorImpl;
75 #define LLVM_FIXED_MD_KIND(EnumID, Name, Value) EnumID = Value, 76 #include "llvm/IR/FixedMetadataKinds.def" 77 #undef LLVM_FIXED_MD_KIND 119 void setGC(
const Function &Fn, std::string GCName);
122 const std::string &getGC(
const Function &Fn);
130 bool shouldDiscardValueNames()
const;
135 void setDiscardValueNames(
bool Discard);
139 bool isODRUniquingDebugTypes()
const;
140 void enableDebugTypeODRUniquing();
141 void disableDebugTypeODRUniquing();
158 void *DiagContext =
nullptr);
166 void *getInlineAsmDiagnosticContext()
const;
176 void setDiagnosticHandlerCallBack(
178 void *DiagContext =
nullptr,
bool RespectFilters =
false);
186 void setDiagnosticHandler(std::unique_ptr<DiagnosticHandler> &&DH,
187 bool RespectFilters =
false);
195 void *getDiagnosticContext()
const;
203 std::unique_ptr<DiagnosticHandler> getDiagnosticHandler();
207 bool getDiagnosticsHotnessRequested()
const;
210 void setDiagnosticsHotnessRequested(
bool Requested);
215 uint64_t getDiagnosticsHotnessThreshold()
const;
219 void setDiagnosticsHotnessThreshold(uint64_t
Threshold);
237 void setRemarkStreamer(std::unique_ptr<RemarkStreamer>
RemarkStreamer);
286 void emitError(
unsigned LocCookie,
const Twine &ErrorStr);
288 void emitError(
const Twine &ErrorStr);
293 template <
typename ValT,
typename Base, ValT(Base::*Mem)>
318 void removeModule(
Module*);
336 #endif // LLVM_IR_LLVMCONTEXT_H This is the base class for diagnostic handling in LLVM.
This class represents lattice values for constants.
A Module instance is used to store all the information related to an LLVM module. ...
Extensions to this class implement mechanisms to disable passes and individual optimizations at compi...
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
void(*)(LLVMContext *Context, void *OpaqueHandle) YieldCallbackTy
Defines the type of a yield callback.
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)
static void DiagHandler(const SMDiagnostic &Diag, void *Context)
static OptionRegistry & instance()
Returns a reference to the singleton instance.
struct LLVMOpaqueContext * LLVMContextRef
The top-level container for all LLVM global data.
void(*)(const DiagnosticInfo &DI, void *Context) DiagnosticHandlerTy
This is the base abstract class for diagnostic reporting in the backend.
This is an important class for using LLVM in a threaded context.
LLVMContextImpl *const pImpl
ValT getOption() const
Query for a debug option's value.
This file declares helper objects for defining debug options that can be configured via the command l...
void(*)(const SMDiagnostic &, void *Context, unsigned LocCookie) InlineAsmDiagHandlerTy
Synchronized with respect to all concurrently executing threads.
static cl::opt< unsigned > Threshold("loop-unswitch-threshold", cl::desc("Max loop size to unswitch"), cl::init(100), cl::Hidden)
LLVMAttributeRef wrap(Attribute Attr)
Synchronized with respect to signal handlers executing in the same thread.
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...