Karl Schimpf | 8d7abae | 2014-07-07 14:50:30 -0700 | [diff] [blame] | 1 | //===- subzero/src/PNaClTranslator.h - ICE from bitcode ---------*- 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 PNaCl bitcode file to ICE, to machine code |
| 11 | // translator. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #ifndef SUBZERO_SRC_PNACLTRANSLATOR_H |
| 16 | #define SUBZERO_SRC_PNACLTRANSLATOR_H |
| 17 | |
Karl Schimpf | 8d7abae | 2014-07-07 14:50:30 -0700 | [diff] [blame] | 18 | #include <string> |
| 19 | |
Jim Stichnoth | a18cc9c | 2014-09-30 19:10:22 -0700 | [diff] [blame] | 20 | #include "IceTranslator.h" |
| 21 | |
Karl Schimpf | 8d7abae | 2014-07-07 14:50:30 -0700 | [diff] [blame] | 22 | namespace Ice { |
| 23 | |
| 24 | class PNaClTranslator : public Translator { |
Jim Stichnoth | 7b451a9 | 2014-10-15 14:39:23 -0700 | [diff] [blame] | 25 | PNaClTranslator(const PNaClTranslator &) = delete; |
| 26 | PNaClTranslator &operator=(const PNaClTranslator &) = delete; |
| 27 | |
Karl Schimpf | 8d7abae | 2014-07-07 14:50:30 -0700 | [diff] [blame] | 28 | public: |
Karl Schimpf | d6064a1 | 2014-08-27 15:34:58 -0700 | [diff] [blame] | 29 | PNaClTranslator(GlobalContext *Ctx, const ClFlags &Flags) |
| 30 | : Translator(Ctx, Flags) {} |
Karl Schimpf | 8d7abae | 2014-07-07 14:50:30 -0700 | [diff] [blame] | 31 | // Reads the PNaCl bitcode file and translates to ICE, which is then |
Karl Schimpf | b164d20 | 2014-07-11 10:26:34 -0700 | [diff] [blame] | 32 | // converted to machine code. Sets ErrorStatus to true if any |
Karl Schimpf | 8d7abae | 2014-07-07 14:50:30 -0700 | [diff] [blame] | 33 | // errors occurred. |
| 34 | void translate(const std::string &IRFilename); |
Karl Schimpf | 8d7abae | 2014-07-07 14:50:30 -0700 | [diff] [blame] | 35 | }; |
Jim Stichnoth | 7b451a9 | 2014-10-15 14:39:23 -0700 | [diff] [blame] | 36 | |
| 37 | } // end of namespace Ice |
Karl Schimpf | 8d7abae | 2014-07-07 14:50:30 -0700 | [diff] [blame] | 38 | |
| 39 | #endif // SUBZERO_SRC_PNACLTRANSLATOR_H |