[all-commits] [llvm/llvm-project] d1baf2: [mlir] Add support to SourceMgrDiagnosticHandler f...

River Riddle via All-commits all-commits at lists.llvm.org
Fri Jun 18 14:16:45 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d1baf2895467735ab14f4b3415fce204c0cc8e7f
      https://github.com/llvm/llvm-project/commit/d1baf2895467735ab14f4b3415fce204c0cc8e7f
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M mlir/docs/Diagnostics.md
    M mlir/include/mlir/IR/Diagnostics.h
    M mlir/lib/IR/Diagnostics.cpp
    A mlir/test/IR/diagnostic-handler-filter.mlir
    M mlir/test/lib/IR/CMakeLists.txt
    A mlir/test/lib/IR/TestDiagnostics.cpp
    M mlir/tools/mlir-opt/mlir-opt.cpp

  Log Message:
  -----------
  [mlir] Add support to SourceMgrDiagnosticHandler for filtering FileLineColLocs

This revision adds support for passing a functor to SourceMgrDiagnosticHandler for filtering out FileLineColLocs when emitting a diagnostic. More specifically, this can be useful in situations where there may be large CallSiteLocs with locations that aren't necessarily important/useful for users.

For now the filtering support is limited to FileLineColLocs, but conceptually we could allow filtering for all locations types if a need arises in the future.

Differential Revision: https://reviews.llvm.org/D103649




More information about the All-commits mailing list