diff options
Diffstat (limited to 'backend/include/rcc/CodeGen/MachineInstr.h')
| -rw-r--r-- | backend/include/rcc/CodeGen/MachineInstr.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/backend/include/rcc/CodeGen/MachineInstr.h b/backend/include/rcc/CodeGen/MachineInstr.h index 78d48cb..69d7dd7 100644 --- a/backend/include/rcc/CodeGen/MachineInstr.h +++ b/backend/include/rcc/CodeGen/MachineInstr.h @@ -121,6 +121,16 @@ public: Location.reset(); } + [[nodiscard]] const std::optional<MachineDebugLocation> &debugLocation() const noexcept { + return DebugLocation; + } + + [[nodiscard]] Expected<void> setDebugLocation(MachineDebugLocation NewLocation); + + void clearDebugLocation() noexcept { + DebugLocation.reset(); + } + [[nodiscard]] std::optional<OriginID> origin() const noexcept { return Origin; } @@ -164,6 +174,7 @@ private: std::vector<const MachineMemOperand *> MemOperands; MachineInstrFlags Flags; std::optional<SourceLocation> Location; + std::optional<MachineDebugLocation> DebugLocation; std::optional<OriginID> Origin; std::uint32_t DebugInstrNumber = 0; |
