Chromium Code Reviews| Index: src/IceConverter.h |
| diff --git a/src/IceConverter.h b/src/IceConverter.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1fc6ddcc7fa323b5f3e4e201911f014490611328 |
| --- /dev/null |
| +++ b/src/IceConverter.h |
| @@ -0,0 +1,48 @@ |
| +//===- subzero/src/IceConverter.h - Converts LLVM to ICE --------*- C++ -*-===// |
| +// |
| +// The Subzero Code Generator |
| +// |
| +// This file is distributed under the University of Illinois Open Source |
| +// License. See LICENSE.TXT for details. |
| +// |
| +//===----------------------------------------------------------------------===// |
| +// |
| +// This file declares the LLVM to ICE converter. |
| +// |
| +//===----------------------------------------------------------------------===// |
| + |
| +#ifndef SUBZERO_SRC_ICECONVERTER_H |
| +#define SUBZERO_SRC_ICECONVERTER_H |
| + |
| +#include "IceGlobalContext.h" |
| + |
| +namespace llvm { |
|
Jim Stichnoth
2014/06/26 23:50:12
Could we just declare like this:
class llvm::Mod
Karl
2014/06/27 16:15:22
The problem is that doesn't work (you can't use a
|
| +class Module; |
| +} |
| + |
| +namespace Llvm2Ice { |
| + |
| +class Converter { |
| +public: |
| + Converter(Ice::GlobalContext *Ctx, |
| + bool DisableInternal, |
| + bool SubzeroTimingEnabled, |
| + bool DisableTranslation) |
| + : Ctx(Ctx), |
| + DisableInternal(DisableInternal), |
| + SubzeroTimingEnabled(SubzeroTimingEnabled), |
| + DisableTranslation(DisableTranslation) |
| + {} |
| + /// Converts the LLVM Module to ICE. Returns exit status 0 if successful, |
| + /// Nonzero otherwise. |
| + int convertToIce(llvm::Module *Mod); |
| +private: |
| + Ice::GlobalContext *Ctx; |
| + bool DisableInternal; |
| + bool SubzeroTimingEnabled; |
| + bool DisableTranslation; |
| +}; |
| + |
| +} |
| + |
| +#endif // SUBZERO_SRC_ICECONVERTER_H |