1 //===-- RenderScriptExpressionOpts.h ----------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLDB_RENDERSCRIPT_EXPROPTS_H
11 #define LLDB_RENDERSCRIPT_EXPROPTS_H
15 // Other libraries and framework includes
16 #include "llvm/IR/Module.h"
17 #include "llvm/Support/TargetRegistry.h"
18 #include "llvm/Target/TargetMachine.h"
19 #include "llvm/Target/TargetOptions.h"
22 #include "lldb/Target/LanguageRuntime.h"
23 #include "lldb/Target/Process.h"
24 #include "lldb/lldb-private.h"
26 #include "RenderScriptRuntime.h"
27 #include "RenderScriptx86ABIFixups.h"
29 // RenderScriptRuntimeModulePass is a simple llvm::ModulesPass that is used
30 // during expression evaluation to apply RenderScript-specific fixes for
31 // expression evaluation. In particular this is used to make expression IR
32 // conformant with the ABI generated by the slang frontend. This ModulePass is
33 // executed in ClangExpressionParser::PrepareForExecution whenever an
34 // expression's DWARF language is eLanguageTypeExtRenderscript
36 class RenderScriptRuntimeModulePass : public llvm::ModulePass {
39 RenderScriptRuntimeModulePass(const lldb_private::Process *process)
40 : ModulePass(ID), m_process_ptr(process) {}
42 bool runOnModule(llvm::Module &module);
45 const lldb_private::Process *m_process_ptr;
48 namespace lldb_private {
49 namespace lldb_renderscript {
50 struct RSIRPasses : public lldb_private::LLVMUserExpression::IRPasses {
51 RSIRPasses(lldb_private::Process *process);
55 } // namespace lldb_renderscript
56 } // namespace lldb_private