1*19459580SLuke Drummond //===-- ExpressionOpts.h ----------------------------------------*- C++ -*-===// 2*19459580SLuke Drummond // 3*19459580SLuke Drummond // The LLVM Compiler Infrastructure 4*19459580SLuke Drummond // 5*19459580SLuke Drummond // This file is distributed under the University of Illinois Open Source 6*19459580SLuke Drummond // License. See LICENSE.TXT for details. 7*19459580SLuke Drummond // 8*19459580SLuke Drummond //===----------------------------------------------------------------------===// 9*19459580SLuke Drummond 10*19459580SLuke Drummond #ifndef LLDB_RENDERSCRIPT_EXPROPTS_H 11*19459580SLuke Drummond #define LLDB_RENDERSCRIPT_EXPROPTS_H 12*19459580SLuke Drummond 13*19459580SLuke Drummond // C Includes 14*19459580SLuke Drummond // C++ Includes 15*19459580SLuke Drummond // Other libraries and framework includes 16*19459580SLuke Drummond #include "llvm/IR/Module.h" 17*19459580SLuke Drummond #include "llvm/Support/TargetRegistry.h" 18*19459580SLuke Drummond #include "llvm/Target/TargetMachine.h" 19*19459580SLuke Drummond #include "llvm/Target/TargetOptions.h" 20*19459580SLuke Drummond 21*19459580SLuke Drummond // Project includes 22*19459580SLuke Drummond #include "lldb/Target/LanguageRuntime.h" 23*19459580SLuke Drummond #include "lldb/Target/Process.h" 24*19459580SLuke Drummond #include "lldb/lldb-private.h" 25*19459580SLuke Drummond 26*19459580SLuke Drummond #include "RenderScriptRuntime.h" 27*19459580SLuke Drummond #include "RenderScriptx86ABIFixups.h" 28*19459580SLuke Drummond 29*19459580SLuke Drummond // RenderScriptRuntimeModulePass is a simple llvm::ModulesPass that is used during expression evaluation to apply 30*19459580SLuke Drummond // RenderScript-specific fixes for expression evaluation. 31*19459580SLuke Drummond // In particular this is used to make expression IR conformant with the ABI generated by the slang frontend. This 32*19459580SLuke Drummond // ModulePass is executed in ClangExpressionParser::PrepareForExecution whenever an expression's DWARF language is 33*19459580SLuke Drummond // eLanguageTypeExtRenderscript 34*19459580SLuke Drummond 35*19459580SLuke Drummond class RenderScriptRuntimeModulePass : public llvm::ModulePass 36*19459580SLuke Drummond { 37*19459580SLuke Drummond public: 38*19459580SLuke Drummond static char ID; 39*19459580SLuke Drummond RenderScriptRuntimeModulePass(const lldb_private::Process *process) : ModulePass(ID), m_process_ptr(process) {} 40*19459580SLuke Drummond 41*19459580SLuke Drummond bool 42*19459580SLuke Drummond runOnModule(llvm::Module &module); 43*19459580SLuke Drummond 44*19459580SLuke Drummond private: 45*19459580SLuke Drummond const lldb_private::Process *m_process_ptr; 46*19459580SLuke Drummond }; 47*19459580SLuke Drummond 48*19459580SLuke Drummond namespace lldb_private 49*19459580SLuke Drummond { 50*19459580SLuke Drummond namespace lldb_renderscript 51*19459580SLuke Drummond { 52*19459580SLuke Drummond struct RSIRPasses : public lldb_private::LLVMUserExpression::IRPasses 53*19459580SLuke Drummond { 54*19459580SLuke Drummond RSIRPasses(lldb_private::Process *process); 55*19459580SLuke Drummond 56*19459580SLuke Drummond ~RSIRPasses(); 57*19459580SLuke Drummond }; 58*19459580SLuke Drummond } // namespace lldb_renderscript 59*19459580SLuke Drummond } // namespace lldb_private 60*19459580SLuke Drummond #endif 61