Gets the address of a symbol defined in the interpreter.
- Parameters
-
- Returns
- Pointer to symbol, or nullptr if not found
Definition at line 302 of file ClangInterpreter.cpp.
303{
304 if (!
m_impl->interpreter) {
305 LILA_WARN(Emitter::INTERPRETER,
"Cannot get symbol: interpreter not initialized");
306 return nullptr;
307 }
308
309 auto symbol =
m_impl->interpreter->getSymbolAddress(name);
310 if (symbol) {
311 LILA_DEBUG(Emitter::INTERPRETER, std::string(
"Found symbol: ") + name);
312 return reinterpret_cast<void*>(symbol->getValue());
313 }
314
315 LILA_WARN(Emitter::INTERPRETER, std::string(
"Symbol not found: ") + name);
316 return nullptr;
317}
std::unique_ptr< Impl > m_impl
Internal implementation details.
References LILA_DEBUG, LILA_WARN, and m_impl.