| OLD | NEW |
| 1 //===- subzero/src/IceFixups.h - Assembler fixup kinds ----------*- C++ -*-===// | 1 //===- subzero/src/IceFixups.h - Assembler fixup kinds ----------*- C++ -*-===// |
| 2 // | 2 // |
| 3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 /// | 9 /// |
| 10 /// \file | 10 /// \file |
| 11 /// This file declares generic fixup types. | 11 /// This file declares generic fixup types. |
| 12 /// | 12 /// |
| 13 //===----------------------------------------------------------------------===// | 13 //===----------------------------------------------------------------------===// |
| 14 | 14 |
| 15 #ifndef SUBZERO_SRC_ICEFIXUPS_H | 15 #ifndef SUBZERO_SRC_ICEFIXUPS_H |
| 16 #define SUBZERO_SRC_ICEFIXUPS_H | 16 #define SUBZERO_SRC_ICEFIXUPS_H |
| 17 | 17 |
| 18 #include "IceDefs.h" | 18 #include "IceDefs.h" |
| 19 | 19 |
| 20 namespace Ice { | 20 namespace Ice { |
| 21 | 21 |
| 22 /// Each target and container format has a different namespace of relocations. | 22 /// Each target and container format has a different namespace of relocations. |
| 23 /// This holds the specific target+container format's relocation number. | 23 /// This holds the specific target+container format's relocation number. |
| 24 typedef uint32_t FixupKind; | 24 using FixupKind = uint32_t; |
| 25 | 25 |
| 26 /// Assembler fixups are positions in generated code/data that hold relocation | 26 /// Assembler fixups are positions in generated code/data that hold relocation |
| 27 /// information that needs to be processed before finalizing the code/data. | 27 /// information that needs to be processed before finalizing the code/data. |
| 28 struct AssemblerFixup { | 28 struct AssemblerFixup { |
| 29 AssemblerFixup &operator=(const AssemblerFixup &) = delete; | 29 AssemblerFixup &operator=(const AssemblerFixup &) = delete; |
| 30 | 30 |
| 31 public: | 31 public: |
| 32 AssemblerFixup() = default; | 32 AssemblerFixup() = default; |
| 33 AssemblerFixup(const AssemblerFixup &) = default; | 33 AssemblerFixup(const AssemblerFixup &) = default; |
| 34 intptr_t position() const { return position_; } | 34 intptr_t position() const { return position_; } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 46 void set_value(const Constant *Value) { value_ = Value; } | 46 void set_value(const Constant *Value) { value_ = Value; } |
| 47 | 47 |
| 48 void emit(GlobalContext *Ctx, RelocOffsetT OverrideOffset) const; | 48 void emit(GlobalContext *Ctx, RelocOffsetT OverrideOffset) const; |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 intptr_t position_ = 0; | 51 intptr_t position_ = 0; |
| 52 FixupKind kind_ = 0; | 52 FixupKind kind_ = 0; |
| 53 const Constant *value_ = nullptr; | 53 const Constant *value_ = nullptr; |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 typedef std::vector<AssemblerFixup> FixupList; | 56 using FixupList = std::vector<AssemblerFixup>; |
| 57 typedef std::vector<AssemblerFixup *> FixupRefList; | 57 using FixupRefList = std::vector<AssemblerFixup *>; |
| 58 | 58 |
| 59 } // end of namespace Ice | 59 } // end of namespace Ice |
| 60 | 60 |
| 61 #endif // SUBZERO_SRC_ICEFIXUPS_H | 61 #endif // SUBZERO_SRC_ICEFIXUPS_H |
| OLD | NEW |