diff options
| author | Alexander Batashev <alexbatashev@gmail.com> | 2023-11-24 15:13:39 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-24 15:13:39 +0300 |
| commit | a4ee55fe6ea088f55bf44236bd05f6a847a3de6c (patch) | |
| tree | e830279746529120cd44d8053b798d997ebccc84 /mlir/lib/Conversion/MathToLibm/MathToLibm.cpp | |
| parent | 6bdeb53ed9ad85fc16f495120b4e2382c4bdaafa (diff) | |
[MLIR][NFC] Fix build on recent GCC with C++20 enabled (#73308)
The following pattern fails on recent GCC versions with -std=c++20 flag
passed and succeeds with -std=c++17. Such behavior is not observed on
Clang 16.0.
```
template <typename T>
struct Foo {
Foo<T>(int a) {}
};
```
This patch removes template parameter from constructor in two occurences
to make the following command complete successfully:
bazel build -c fastbuild --cxxopt=-std=c++20 --host_cxxopt=-std=c++20
@llvm-project//mlir/...
This patch is similar to https://reviews.llvm.org/D154782
Co-authored-by: Alexander Batashev <a.batashev@partner.samsung.com>
Diffstat (limited to 'mlir/lib/Conversion/MathToLibm/MathToLibm.cpp')
| -rw-r--r-- | mlir/lib/Conversion/MathToLibm/MathToLibm.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/Conversion/MathToLibm/MathToLibm.cpp b/mlir/lib/Conversion/MathToLibm/MathToLibm.cpp index 7fd94116ef7a..103c1fb8c382 100644 --- a/mlir/lib/Conversion/MathToLibm/MathToLibm.cpp +++ b/mlir/lib/Conversion/MathToLibm/MathToLibm.cpp @@ -50,8 +50,8 @@ template <typename Op> struct ScalarOpToLibmCall : public OpRewritePattern<Op> { public: using OpRewritePattern<Op>::OpRewritePattern; - ScalarOpToLibmCall<Op>(MLIRContext *context, StringRef floatFunc, - StringRef doubleFunc) + ScalarOpToLibmCall(MLIRContext *context, StringRef floatFunc, + StringRef doubleFunc) : OpRewritePattern<Op>(context), floatFunc(floatFunc), doubleFunc(doubleFunc){}; |
