blob: 460c3274afeeb5bd6522ea1f1fd1fafaeb72eda1 [file] [log] [blame]
Jan Voung44c3a802015-03-27 16:29:08 -07001//===- subzero/src/IceCompiler.h - Compiler driver --------------*- C++ -*-===//
2//
3// The Subzero Code Generator
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file declares the driver for translating bitcode to native code.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef SUBZERO_SRC_ICECOMPILER_H
15#define SUBZERO_SRC_ICECOMPILER_H
16
17#include "IceDefs.h"
18
19namespace llvm {
20class DataStreamer;
21}
22
23namespace Ice {
24
25class ClFlagsExtra;
26
27// A compiler driver. It may be called to handle a single compile request.
28class Compiler {
29 Compiler(const Compiler &) = delete;
30 Compiler &operator=(const Compiler &) = delete;
31
32public:
Jim Stichnotheafb56c2015-06-22 10:35:22 -070033 Compiler() = default;
Jan Voung44c3a802015-03-27 16:29:08 -070034
35 // Run the compiler with the given GlobalContext for compilation
36 // state. Upon error, the Context's error status will be set.
37 void run(const ClFlagsExtra &ExtraFlags, GlobalContext &Ctx,
38 std::unique_ptr<llvm::DataStreamer> &&InputStream);
39};
40
41} // end of namespace Ice
42
43#endif // SUBZERO_SRC_ICECOMPILER_H