![]() |
Spicy
|
#include <context.h>
Public Member Functions | |
template<typename T > | |
T | getAuxOption (const std::string &key, T default_) const |
template<typename T > | |
void | setAuxOption (const std::string &key, T value) |
Result< Nothing > | parseDebugAddl (const std::string &flags) |
void | print (std::ostream &out) const |
Public Attributes | |
bool | debug = false |
bool | debug_trace |
bool | debug_flow = false |
bool | track_location = true |
bool | skip_validation = false |
bool | optimize = false |
std::vector< hilti::rt::filesystem::path > | library_paths |
std::string | cxx_namespace_extern |
std::string | cxx_namespace_intern = "__hlt" |
std::vector< hilti::rt::filesystem::path > | cxx_include_paths |
bool | keep_tmps = false |
Options controlling the compiler's code generation.
In addition to HILTI's built-in options, external components can store further options through auxiliary value/key mappings.
|
inline |
Retrieves the value for an auxiliary option.
key | unique key, which should use a namespaced x.y structure. |
default | value to return if key has not been explicitly set |
type | of the key's value, which must match the type used when the option is being set |
Parses a comma-separated list of tokens indicating which additional debug instrumentation to activate, and sets the instance's corresponding options.
void Options::print | ( | std::ostream & | out | ) | const |
Prints out a humand-readable version of the current options.
|
inline |
Sets the value for an auxiliary option.
key | unique key, which should use a namespaced x.y structure. |
value | value to record for the option |
type | of the key's value, which must match the type used when the option is being retrieved |
std::vector<hilti::rt::filesystem::path> hilti::Options::cxx_include_paths |
additional C++ directories to search for #include files
std::string hilti::Options::cxx_namespace_extern |
CXX namespace for generated C++ code accessible to the host application
std::string hilti::Options::cxx_namespace_intern = "__hlt" |
CXX namespace for generated internal C++ code
bool hilti::Options::debug = false |
if true, generate non-optimized debug code
bool hilti::Options::debug_flow = false |
if true, generate code to log function calls and returns to debug stream "hilti-flow" (requires debug, too)
bool hilti::Options::debug_trace |
if true, generate code to log statements to debug stream "hilti-trace" (requires debug, too)
bool hilti::Options::keep_tmps = false |
if true, do not remove generated files on exit
std::vector<hilti::rt::filesystem::path> hilti::Options::library_paths |
additional directories to search for imported files
bool hilti::Options::optimize = false |
generated optimized code
bool hilti::Options::skip_validation = false |
if true, skip AST validation; for debugging only, things may go downhill quickly if an AST is not well-formed
bool hilti::Options::track_location = true |
if true, generate code to record current source code location during execution