Gets the address of a symbol defined in the interpreter.
- Parameters
-
- Returns
- Pointer to symbol, or nullptr if not found
Definition at line 204 of file ClangInterpreter.cpp.
205{
206 if (!
m_impl->interpreter) {
207 LILA_WARN(Emitter::INTERPRETER,
"Cannot get symbol: interpreter not initialized");
208 return nullptr;
209 }
210
211 auto symbol =
m_impl->interpreter->getSymbolAddress(name);
212 if (symbol) {
213 LILA_DEBUG(Emitter::INTERPRETER, std::string(
"Found symbol: ") + name);
214 return reinterpret_cast<void*>(symbol->getValue());
215 }
216
217 LILA_WARN(Emitter::INTERPRETER, std::string(
"Symbol not found: ") + name);
218 return nullptr;
219}
std::unique_ptr< Impl > m_impl
Internal implementation details.
References LILA_DEBUG, LILA_WARN, and m_impl.