-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathcodegen.h
30 lines (23 loc) · 821 Bytes
/
codegen.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//===- codegen.h - Fast and stupid code generator--------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef CODEGEN_H_
#define CODEGEN_H_
#include <map>
#include <llvm/Module.h>
class CodeGenOptions {
public:
CodeGenOptions(): dump_code(false), trace_logging(false) {}
// Output disassembly of each function that is generated, using objdump.
bool dump_code;
// Generate code with log messages to trace execution.
bool trace_logging;
};
void translate(llvm::Module *module, std::map<std::string,uintptr_t> *globals,
CodeGenOptions *options);
#endif