aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/MIR/MIRMetadataTextParser.h
diff options
context:
space:
mode:
Diffstat (limited to 'backend/lib/MIR/MIRMetadataTextParser.h')
-rw-r--r--backend/lib/MIR/MIRMetadataTextParser.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/backend/lib/MIR/MIRMetadataTextParser.h b/backend/lib/MIR/MIRMetadataTextParser.h
index b8ebb12..032523d 100644
--- a/backend/lib/MIR/MIRMetadataTextParser.h
+++ b/backend/lib/MIR/MIRMetadataTextParser.h
@@ -35,6 +35,10 @@ public:
[[nodiscard]] Expected<MachineMetadataValue> parseValue();
[[nodiscard]] Expected<MachineDebugLocation> parseLocation();
+ [[nodiscard]] const TextRange &diagnosticRange() const noexcept {
+ return token().range();
+ }
+
private:
[[nodiscard]] const MIToken &token() const noexcept {
return Tokens[Position];