15 #ifndef LLVM_IR_LLVMCONTEXT_H 16 #define LLVM_IR_LLVMCONTEXT_H 32 class LLVMContextImpl;
35 template <
typename T>
class SmallVectorImpl;
86 MD_invariant_load = 6,
90 MD_mem_parallel_loop_access = 10,
92 MD_dereferenceable = 12,
93 MD_dereferenceable_or_null = 13,
94 MD_make_implicit = 14,
95 MD_unpredictable = 15,
96 MD_invariant_group = 16,
100 MD_section_prefix = 20,
101 MD_absolute_symbol = 21,
105 MD_access_group = 25,
115 OB_gc_transition = 2,
147 void setGC(
const Function &Fn, std::string GCName);
150 const std::string &getGC(
const Function &Fn);
158 bool shouldDiscardValueNames()
const;
163 void setDiscardValueNames(
bool Discard);
167 bool isODRUniquingDebugTypes()
const;
168 void enableDebugTypeODRUniquing();
169 void disableDebugTypeODRUniquing();
186 void *DiagContext =
nullptr);
194 void *getInlineAsmDiagnosticContext()
const;
204 void setDiagnosticHandlerCallBack(
206 void *DiagContext =
nullptr,
bool RespectFilters =
false);
214 void setDiagnosticHandler(std::unique_ptr<DiagnosticHandler> &&DH,
215 bool RespectFilters =
false);
223 void *getDiagnosticContext()
const;
231 std::unique_ptr<DiagnosticHandler> getDiagnosticHandler();
235 bool getDiagnosticsHotnessRequested()
const;
238 void setDiagnosticsHotnessRequested(
bool Requested);
243 uint64_t getDiagnosticsHotnessThreshold()
const;
247 void setDiagnosticsHotnessThreshold(uint64_t
Threshold);
252 yaml::Output *getDiagnosticsOutputFile();
258 void setDiagnosticsOutputFile(std::unique_ptr<yaml::Output>
F);
307 void emitError(
unsigned LocCookie,
const Twine &ErrorStr);
309 void emitError(
const Twine &ErrorStr);
314 template <
typename ValT,
typename Base, ValT(Base::*Mem)>
339 void removeModule(
Module*);
357 #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...
void(*)(LLVMContext *Context, void *OpaqueHandle) YieldCallbackTy
Defines the type of a yield callback.
amdgpu Simplify well known AMD library false Value Value const Twine & Name
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 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
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.
Synchronized with respect to all concurrently executing threads.
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...