1254721Semaste//===-- IRInterpreter.h -----------------------------------------*- C++ -*-===// 2254721Semaste// 3254721Semaste// The LLVM Compiler Infrastructure 4254721Semaste// 5254721Semaste// This file is distributed under the University of Illinois Open Source 6254721Semaste// License. See LICENSE.TXT for details. 7254721Semaste// 8254721Semaste//===----------------------------------------------------------------------===// 9254721Semaste 10254721Semaste#ifndef liblldb_IRInterpreter_h_ 11254721Semaste#define liblldb_IRInterpreter_h_ 12254721Semaste 13254721Semaste#include "lldb/lldb-public.h" 14254721Semaste#include "lldb/Core/ConstString.h" 15254721Semaste#include "lldb/Core/Stream.h" 16254721Semaste#include "lldb/Symbol/TaggedASTType.h" 17254721Semaste#include "llvm/ADT/ArrayRef.h" 18254721Semaste#include "llvm/Pass.h" 19254721Semaste 20254721Semastenamespace llvm { 21254721Semaste class Function; 22254721Semaste class Module; 23254721Semaste} 24254721Semaste 25254721Semastenamespace lldb_private { 26254721Semaste 27254721Semasteclass ClangExpressionDeclMap; 28254721Semasteclass IRMemoryMap; 29254721Semaste 30254721Semaste} 31254721Semaste 32254721Semaste//---------------------------------------------------------------------- 33254721Semaste/// @class IRInterpreter IRInterpreter.h "lldb/Expression/IRInterpreter.h" 34254721Semaste/// @brief Attempt to interpret the function's code if it does not require 35254721Semaste/// running the target. 36254721Semaste/// 37254721Semaste/// In some cases, the IR for an expression can be evaluated entirely 38254721Semaste/// in the debugger, manipulating variables but not executing any code 39254721Semaste/// in the target. The IRInterpreter attempts to do this. 40254721Semaste//---------------------------------------------------------------------- 41254721Semasteclass IRInterpreter 42254721Semaste{ 43254721Semastepublic: 44254721Semaste static bool 45254721Semaste CanInterpret (llvm::Module &module, 46254721Semaste llvm::Function &function, 47254721Semaste lldb_private::Error &error); 48254721Semaste 49254721Semaste static bool 50254721Semaste Interpret (llvm::Module &module, 51254721Semaste llvm::Function &function, 52254721Semaste llvm::ArrayRef<lldb::addr_t> args, 53254721Semaste lldb_private::IRMemoryMap &memory_map, 54254721Semaste lldb_private::Error &error, 55254721Semaste lldb::addr_t stack_frame_bottom, 56254721Semaste lldb::addr_t stack_frame_top); 57254721Semaste 58254721Semasteprivate: 59254721Semaste static bool 60254721Semaste supportsFunction (llvm::Function &llvm_function, 61254721Semaste lldb_private::Error &err); 62254721Semaste}; 63254721Semaste 64254721Semaste#endif 65