blob: 63b283dd3ff1e1f5b21290e509ea95131944ec77 [file] [log] [blame]
Logan Chienf04364f2012-02-10 12:01:39 +08001/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
TDYa127eead4ac2012-06-03 07:15:25 -070017#ifndef ART_SRC_COMPILER_LLVM_STUB_COMPILER_H_
18#define ART_SRC_COMPILER_LLVM_STUB_COMPILER_H_
Logan Chienf04364f2012-02-10 12:01:39 +080019
Logan Chienf04364f2012-02-10 12:01:39 +080020#include <stdint.h>
21
22namespace art {
23 class CompiledInvokeStub;
TDYa127eead4ac2012-06-03 07:15:25 -070024 class CompiledProxyStub;
Ian Rogers1212a022013-03-04 10:48:41 -080025 class CompilerDriver;
Logan Chienf04364f2012-02-10 12:01:39 +080026}
27
28namespace llvm {
29 class LLVMContext;
30 class Module;
31}
32
33namespace art {
34namespace compiler_llvm {
35
Brian Carlstrom641ce032013-01-31 15:21:37 -080036class LlvmCompilationUnit;
Logan Chienf04364f2012-02-10 12:01:39 +080037class CompilerLLVM;
38class IRBuilder;
39
TDYa127eead4ac2012-06-03 07:15:25 -070040class StubCompiler {
Logan Chienf04364f2012-02-10 12:01:39 +080041 public:
Ian Rogers1212a022013-03-04 10:48:41 -080042 StubCompiler(LlvmCompilationUnit* cunit, const CompilerDriver& compiler);
Logan Chienf04364f2012-02-10 12:01:39 +080043
Logan Chien12584172012-07-10 04:07:28 -070044 CompiledInvokeStub* CreateInvokeStub(bool is_static, const char* shorty);
45 CompiledInvokeStub* CreateProxyStub(const char* shorty);
Logan Chienf04364f2012-02-10 12:01:39 +080046
47 private:
Brian Carlstrom641ce032013-01-31 15:21:37 -080048 LlvmCompilationUnit* cunit_;
Ian Rogers1212a022013-03-04 10:48:41 -080049 const CompilerDriver* const driver_;
Logan Chienf04364f2012-02-10 12:01:39 +080050 llvm::Module* module_;
51 llvm::LLVMContext* context_;
52 IRBuilder& irb_;
Logan Chienf04364f2012-02-10 12:01:39 +080053};
54
55
56} // namespace compiler_llvm
57} // namespace art
58
59
TDYa127eead4ac2012-06-03 07:15:25 -070060#endif // ART_SRC_COMPILER_LLVM_STUB_COMPILER_H_