| 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 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 using FixupKind = uint32_t; | 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 class AssemblerFixup { | 28 class 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 virtual ~AssemblerFixup() = default; |
| 34 intptr_t position() const { | 35 intptr_t position() const { |
| 35 assert(position_was_set_); | 36 assert(position_was_set_); |
| 36 return position_; | 37 return position_; |
| 37 } | 38 } |
| 38 void set_position(intptr_t Position) { | 39 void set_position(intptr_t Position) { |
| 39 position_ = Position; | 40 position_ = Position; |
| 40 position_was_set_ = true; | 41 position_was_set_ = true; |
| 41 } | 42 } |
| 42 | 43 |
| 43 FixupKind kind() const { return kind_; } | 44 FixupKind kind() const { return kind_; } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 const std::string Message; | 92 const std::string Message; |
| 92 const size_t NumBytes; | 93 const size_t NumBytes; |
| 93 }; | 94 }; |
| 94 | 95 |
| 95 using FixupList = std::vector<AssemblerFixup>; | 96 using FixupList = std::vector<AssemblerFixup>; |
| 96 using FixupRefList = std::vector<AssemblerFixup *>; | 97 using FixupRefList = std::vector<AssemblerFixup *>; |
| 97 | 98 |
| 98 } // end of namespace Ice | 99 } // end of namespace Ice |
| 99 | 100 |
| 100 #endif // SUBZERO_SRC_ICEFIXUPS_H | 101 #endif // SUBZERO_SRC_ICEFIXUPS_H |
| OLD | NEW |