[Mlir-commits] [mlir] [mlir] Add FileRange location type. (PR #80213)

Mehdi Amini llvmlistbot at llvm.org
Wed Jan 31 17:00:35 PST 2024


================
@@ -102,6 +102,44 @@ def FileLineColLoc : Builtin_LocationAttr<"FileLineColLoc"> {
   let attrName = "builtin.file_line_loc";
 }
 
+//===----------------------------------------------------------------------===//
+// FileRange
+//===----------------------------------------------------------------------===//
+
+def FileRangeLoc : Builtin_LocationAttr<"FileRangeLoc"> {
+  let summary = "A file:line:column to line:column source location range";
+  let description = [{
+    Syntax:
+
+    ```
+    filelinecol-location ::= `range(` string-literal `:` integer-literal `:`
+                             integer-literal ` to ` integer-literal `)`
+    ```
+
+    An instance of this location represents a tuple of file, start line number,
+    start column number, end line, and end column number. This represents a range
----------------
joker-eph wrote:

The description looks misleading to me: we don't print or encode the end line/column right?

https://github.com/llvm/llvm-project/pull/80213


More information about the Mlir-commits mailing list