Index: src/IceTargetLoweringX8664.h |
diff --git a/src/IceTargetLoweringX8664.h b/src/IceTargetLoweringX8664.h |
index 90daf8c23f7d22957e2038f564b705410b4e9dfe..302fb0f96ae25bc9e7da1de403c0aeace717720d 100644 |
--- a/src/IceTargetLoweringX8664.h |
+++ b/src/IceTargetLoweringX8664.h |
@@ -1,4 +1,4 @@ |
-//===- subzero/src/IceTargetLoweringX8664.h - x86-64 lowering ---*- C++ -*-===// |
+//===- subzero/src/IceTargetLoweringX8664.h - lowering for x86-64 -*- C++ -*-=// |
// |
// The Subzero Code Generator |
// |
@@ -7,15 +7,16 @@ |
// |
//===----------------------------------------------------------------------===// |
// |
-// This file declares the TargetLoweringX8664 class, which |
-// implements the TargetLowering interface for the x86-64 |
-// architecture. |
+// This file declares the TargetLoweringX8664 class, which implements the |
+// TargetLowering interface for the X86 64-bit architecture. |
// |
//===----------------------------------------------------------------------===// |
+ |
#ifndef SUBZERO_SRC_ICETARGETLOWERINGX8664_H |
#define SUBZERO_SRC_ICETARGETLOWERINGX8664_H |
-#include "IceDefs.h" |
+#include "IceCfg.h" |
+#include "IceGlobalContext.h" |
#include "IceTargetLowering.h" |
namespace Ice { |
@@ -26,9 +27,10 @@ class TargetX8664 : public TargetLowering { |
TargetX8664 &operator=(const TargetX8664 &) = delete; |
public: |
- static TargetX8664 *create(Cfg *) { |
- llvm::report_fatal_error("Not yet implemented"); |
- } |
+ static TargetX8664 *create(Cfg *Func); |
+ |
+private: |
+ explicit TargetX8664(Cfg *Func) : TargetLowering(Func) {} |
}; |
class TargetDataX8664 : public TargetDataLowering { |
@@ -37,9 +39,21 @@ class TargetDataX8664 : public TargetDataLowering { |
TargetDataX8664 &operator=(const TargetDataX8664 &) = delete; |
public: |
+ ~TargetDataX8664() override = default; |
+ |
static std::unique_ptr<TargetDataLowering> create(GlobalContext *Ctx) { |
- llvm::report_fatal_error("Not yet implemented"); |
+ return makeUnique<TargetDataX8664>(Ctx); |
} |
+ |
+ void lowerGlobals(const VariableDeclarationList &Vars, |
+ const IceString &SectionSuffix) override; |
+ |
+ void lowerConstants() override; |
+ |
+private: |
+ ENABLE_MAKE_UNIQUE; |
+ |
+ explicit TargetDataX8664(GlobalContext *Ctx) : TargetDataLowering(Ctx) {} |
}; |
class TargetHeaderX8664 : public TargetHeaderLowering { |
@@ -48,11 +62,17 @@ class TargetHeaderX8664 : public TargetHeaderLowering { |
TargetHeaderX8664 &operator=(const TargetHeaderX8664 &) = delete; |
public: |
+ ~TargetHeaderX8664() = default; |
+ |
static std::unique_ptr<TargetHeaderLowering> create(GlobalContext *Ctx) { |
- llvm::report_fatal_error("Not yet implemented"); |
+ return makeUnique<TargetHeaderX8664>(Ctx); |
} |
-}; |
+private: |
+ ENABLE_MAKE_UNIQUE; |
+ |
+ explicit TargetHeaderX8664(GlobalContext *Ctx) : TargetHeaderLowering(Ctx) {} |
+}; |
} // end of namespace Ice |
-#endif // SUBZERO_SRC_ICETARGETLOWERINGX8664_H |
+#endif // SUBZERO_SRC_ICETARGETLOWERINGX8664_H |