Karl Schimpf | e1e013c | 2014-06-27 09:15:29 -0700 | [diff] [blame] | 1 | //===- 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 Schimpf | 8d7abae | 2014-07-07 14:50:30 -0700 | [diff] [blame^] | 17 | #include "IceTranslator.h" |
Karl Schimpf | e1e013c | 2014-06-27 09:15:29 -0700 | [diff] [blame] | 18 | |
| 19 | namespace llvm { |
| 20 | class Module; |
| 21 | } |
| 22 | |
| 23 | namespace Ice { |
| 24 | |
Karl Schimpf | 8d7abae | 2014-07-07 14:50:30 -0700 | [diff] [blame^] | 25 | class Converter : public Translator { |
Karl Schimpf | e1e013c | 2014-06-27 09:15:29 -0700 | [diff] [blame] | 26 | public: |
Karl Schimpf | 8d7abae | 2014-07-07 14:50:30 -0700 | [diff] [blame^] | 27 | Converter(GlobalContext *Ctx, Ice::ClFlags &Flags) : Translator(Ctx, Flags) {} |
Karl Schimpf | e1e013c | 2014-06-27 09:15:29 -0700 | [diff] [blame] | 28 | /// Converts the LLVM Module to ICE. Returns exit status 0 if successful, |
| 29 | /// Nonzero otherwise. |
| 30 | int convertToIce(llvm::Module *Mod); |
Karl Schimpf | e1e013c | 2014-06-27 09:15:29 -0700 | [diff] [blame] | 31 | |
Karl Schimpf | 8d7abae | 2014-07-07 14:50:30 -0700 | [diff] [blame^] | 32 | private: |
| 33 | Converter(const Converter &) LLVM_DELETED_FUNCTION; |
| 34 | Converter &operator=(const Converter &) LLVM_DELETED_FUNCTION; |
| 35 | }; |
Karl Schimpf | e1e013c | 2014-06-27 09:15:29 -0700 | [diff] [blame] | 36 | } |
| 37 | |
Karl Schimpf | 8d7abae | 2014-07-07 14:50:30 -0700 | [diff] [blame^] | 38 | #endif // SUBZERO_SRC_ICECONVERTER_H |