[all-commits] [llvm/llvm-project] 461a1c: [mlir][ods] resolve the wrong indent issue (#189277)

AidinT via All-commits all-commits at lists.llvm.org
Wed Apr 1 06:21:17 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 461a1c51bf0998edc1fd3b9b7197437136c2fb18
      https://github.com/llvm/llvm-project/commit/461a1c51bf0998edc1fd3b9b7197437136c2fb18
  Author: AidinT <at.aidin at gmail.com>
  Date:   2026-04-01 (Wed, 01 Apr 2026)

  Changed paths:
    M mlir/tools/mlir-tblgen/CppGenUtilities.cpp

  Log Message:
  -----------
  [mlir][ods] resolve the wrong indent issue (#189277)

The `emitSummaryAndDescComments` is used to generate summary and
description for tablegen generated classes and structs such as Dialects
and Interfaces. The generated summary and description is indented
incorrectly in the output generated file. For example
`NVGPUDialect.h.inc ` looks like the following:

```cpp
namespace mlir::nvgpu {

/// The `NVGPU` dialect provides a bridge between higher-level target-agnostic
///     dialects (GPU and Vector) and the lower-level target-specific dialect
///     (LLVM IR based NVVM dialect) for NVIDIA GPUs. This allow representing PTX
///     specific operations while using MLIR high level dialects such as Memref
///     and Vector for memory and target-specific register operands, respectively.
class NVGPUDialect : public ::mlir::Dialect {
    ...
  };

} // namespace mlir::nvgpu
```

This is because the `emitSummaryAndDescComments` trims the summary and
description from both sides, rendering the re-indentation useless. This
PR resolves this bug.



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