[all-commits] [llvm/llvm-project] b6a98b: [mlir] Report line number from file rather than sp...

Jacques Pienaar via All-commits all-commits at lists.llvm.org
Tue Jul 29 04:29:21 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b6a98b934f63431243ba062aa9e07a52aae05f70
      https://github.com/llvm/llvm-project/commit/b6a98b934f63431243ba062aa9e07a52aae05f70
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2025-07-29 (Tue, 29 Jul 2025)

  Changed paths:
    M mlir/include/mlir/IR/Diagnostics.h
    M mlir/include/mlir/Support/ToolUtilities.h
    M mlir/lib/IR/Diagnostics.cpp
    M mlir/lib/Support/ToolUtilities.cpp
    M mlir/lib/Tools/mlir-opt/MlirOptMain.cpp
    M mlir/lib/Tools/mlir-translate/MlirTranslateMain.cpp
    A mlir/test/IR/diagnostic-nosplit.mlir
    M mlir/test/IR/top-level.mlir
    M mlir/tools/mlir-pdll/mlir-pdll.cpp

  Log Message:
  -----------
  [mlir] Report line number from file rather than split (#150982)

Add convention for lexer if the last file is contained in the first,
then the first is used for error reporting. This requires that these two
overlap to make it easy to find the corresponding spots. Enables going
from

```
within split at mlir/test/IR/invalid.mlir::10 offset :6:9: error: reference to an undefined block
```

to

```
mlir/test/IR/invalid.mlir:15:9: error: reference to an undefined block
```

This does change the split to not produce always null terminated buffers
and tools that need it, need to do so themselves (which is mostly by copying -
this may have little actual impact as previously this was a copy too).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list