blob: dea7d43fdaebedfee355163bd865da964ea9c9e7 [file] [log] [blame]
Karl Schimpf8d7abae2014-07-07 14:50:30 -07001//===- 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 Schimpf8d7abae2014-07-07 14:50:30 -070018#include <string>
19
Jim Stichnotha18cc9c2014-09-30 19:10:22 -070020#include "IceTranslator.h"
21
Karl Schimpf8d7abae2014-07-07 14:50:30 -070022namespace Ice {
23
24class PNaClTranslator : public Translator {
Jim Stichnoth7b451a92014-10-15 14:39:23 -070025 PNaClTranslator(const PNaClTranslator &) = delete;
26 PNaClTranslator &operator=(const PNaClTranslator &) = delete;
27
Karl Schimpf8d7abae2014-07-07 14:50:30 -070028public:
Karl Schimpfd6064a12014-08-27 15:34:58 -070029 PNaClTranslator(GlobalContext *Ctx, const ClFlags &Flags)
30 : Translator(Ctx, Flags) {}
Karl Schimpf8d7abae2014-07-07 14:50:30 -070031 // Reads the PNaCl bitcode file and translates to ICE, which is then
Karl Schimpfb164d202014-07-11 10:26:34 -070032 // converted to machine code. Sets ErrorStatus to true if any
Karl Schimpf8d7abae2014-07-07 14:50:30 -070033 // errors occurred.
34 void translate(const std::string &IRFilename);
Karl Schimpf8d7abae2014-07-07 14:50:30 -070035};
Jim Stichnoth7b451a92014-10-15 14:39:23 -070036
37} // end of namespace Ice
Karl Schimpf8d7abae2014-07-07 14:50:30 -070038
39#endif // SUBZERO_SRC_PNACLTRANSLATOR_H