MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ get_symbol_address()

void * Lila::ClangInterpreter::get_symbol_address ( const std::string &  name)

Gets the address of a symbol defined in the interpreter.

Parameters
nameSymbol name
Returns
Pointer to symbol, or nullptr if not found

Definition at line 233 of file ClangInterpreter.cpp.

234{
235 if (!m_impl->interpreter) {
236 LILA_WARN(Emitter::INTERPRETER, "Cannot get symbol: interpreter not initialized");
237 return nullptr;
238 }
239
240 auto symbol = m_impl->interpreter->getSymbolAddress(name);
241 if (symbol) {
242 LILA_DEBUG(Emitter::INTERPRETER, std::string("Found symbol: ") + name);
243 return reinterpret_cast<void*>(symbol->getValue());
244 }
245
246 LILA_WARN(Emitter::INTERPRETER, std::string("Symbol not found: ") + name);
247 return nullptr;
248}
#define LILA_WARN(emitter, msg)
#define LILA_DEBUG(emitter, msg)
std::unique_ptr< Impl > m_impl
Internal implementation details.

References LILA_DEBUG, LILA_WARN, and m_impl.