Gets the address of a symbol defined in the interpreter.
- Parameters
-
- Returns
- Pointer to symbol, or nullptr if not found
Definition at line 320 of file ClangInterpreter.cpp.
321{
322 if (!
m_impl->interpreter) {
323 LILA_WARN(Emitter::INTERPRETER,
"Cannot get symbol: interpreter not initialized");
324 return nullptr;
325 }
326
327 auto symbol =
m_impl->interpreter->getSymbolAddress(name);
328 if (symbol) {
329 LILA_DEBUG(Emitter::INTERPRETER, std::string(
"Found symbol: ") + name);
330 return reinterpret_cast<void*>(symbol->getValue());
331 }
332
333 LILA_WARN(Emitter::INTERPRETER, std::string(
"Symbol not found: ") + name);
334 return nullptr;
335}
std::unique_ptr< Impl > m_impl
Internal implementation details.
References LILA_DEBUG, LILA_WARN, and m_impl.