diff options
author | Matthias Springer <me@m-sp.org> | 2024-10-05 21:32:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-05 21:32:40 +0200 |
commit | 206fad0e218e83799e49ca15545d997c6c5e8a03 (patch) | |
tree | 9bf7277fb4c06f26f5934280ca020432eac201b0 /flang/lib/Optimizer/CodeGen/CodeGenOpenMP.cpp | |
parent | 73683cc1ab0fe79a4b02b956cf3c033250537bff (diff) | |
download | llvm-206fad0e218e83799e49ca15545d997c6c5e8a03.zip llvm-206fad0e218e83799e49ca15545d997c6c5e8a03.tar.gz llvm-206fad0e218e83799e49ca15545d997c6c5e8a03.tar.bz2 |
[mlir][NFC] Mark type converter in `populate...` functions as `const` (#111250)
This commit marks the type converter in `populate...` functions as
`const`. This is useful for debugging.
Patterns already take a `const` type converter. However, some
`populate...` functions do not only add new patterns, but also add
additional type conversion rules. That makes it difficult to find the
place where a type conversion was added in the code base. With this
change, all `populate...` functions that only populate pattern now have
a `const` type converter. Programmers can then conclude from the
function signature that these functions do not register any new type
conversion rules.
Also some minor cleanups around the 1:N dialect conversion
infrastructure, which did not always pass the type converter as a
`const` object internally.
Diffstat (limited to 'flang/lib/Optimizer/CodeGen/CodeGenOpenMP.cpp')
-rw-r--r-- | flang/lib/Optimizer/CodeGen/CodeGenOpenMP.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/flang/lib/Optimizer/CodeGen/CodeGenOpenMP.cpp b/flang/lib/Optimizer/CodeGen/CodeGenOpenMP.cpp index 48d6c000e..da13ed6 100644 --- a/flang/lib/Optimizer/CodeGen/CodeGenOpenMP.cpp +++ b/flang/lib/Optimizer/CodeGen/CodeGenOpenMP.cpp @@ -93,6 +93,6 @@ struct MapInfoOpConversion } // namespace void fir::populateOpenMPFIRToLLVMConversionPatterns( - LLVMTypeConverter &converter, mlir::RewritePatternSet &patterns) { + const LLVMTypeConverter &converter, mlir::RewritePatternSet &patterns) { patterns.add<MapInfoOpConversion>(converter); } |