blob: dc18e7a09838e9b6feca9cf0ba8dee1bb4c35b2e [file] [log] [blame]
Karl Schimpfe1e013c2014-06-27 09:15:29 -07001//===- subzero/src/IceConverter.h - Converts LLVM to ICE --------*- 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 LLVM to ICE converter.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef SUBZERO_SRC_ICECONVERTER_H
15#define SUBZERO_SRC_ICECONVERTER_H
16
Karl Schimpf8d7abae2014-07-07 14:50:30 -070017#include "IceTranslator.h"
Karl Schimpfe1e013c2014-06-27 09:15:29 -070018
19namespace llvm {
20class Module;
21}
22
23namespace Ice {
24
Karl Schimpf8d7abae2014-07-07 14:50:30 -070025class Converter : public Translator {
Karl Schimpfe1e013c2014-06-27 09:15:29 -070026public:
Karl Schimpf8d7abae2014-07-07 14:50:30 -070027 Converter(GlobalContext *Ctx, Ice::ClFlags &Flags) : Translator(Ctx, Flags) {}
Karl Schimpfe1e013c2014-06-27 09:15:29 -070028 /// Converts the LLVM Module to ICE. Returns exit status 0 if successful,
29 /// Nonzero otherwise.
30 int convertToIce(llvm::Module *Mod);
Karl Schimpfe1e013c2014-06-27 09:15:29 -070031
Karl Schimpf8d7abae2014-07-07 14:50:30 -070032private:
33 Converter(const Converter &) LLVM_DELETED_FUNCTION;
34 Converter &operator=(const Converter &) LLVM_DELETED_FUNCTION;
35};
Karl Schimpfe1e013c2014-06-27 09:15:29 -070036}
37
Karl Schimpf8d7abae2014-07-07 14:50:30 -070038#endif // SUBZERO_SRC_ICECONVERTER_H