[mlir] Fix two build warnings in VectorToGPU (NFC)
authorJie Fu <jiefu@tencent.com>
Wed, 15 Feb 2023 01:31:16 +0000 (09:31 +0800)
committerJie Fu <jiefu@tencent.com>
Wed, 15 Feb 2023 01:35:49 +0000 (09:35 +0800)
commitc0f504df485707e9852047671222076a7de035da
treec2c4d72f9e640694a8a0a92242933f82c047dd18
parentbb692d44c43f85e9f08c1ec9cb62104499b14c1c
[mlir] Fix two build warnings in VectorToGPU (NFC)

In file included from /data/llvm-project/mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp:13:
/data/llvm-project/mlir/include/mlir/Conversion/VectorToGPU/VectorToGPU.h:15:1: error: class 'LogicalResult' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags]
class LogicalResult;
^
/data/llvm-project/mlir/include/mlir/Support/LogicalResult.h:26:22: note: previous use is here
struct [[nodiscard]] LogicalResult {
                     ^
/data/llvm-project/mlir/include/mlir/Conversion/VectorToGPU/VectorToGPU.h:15:1: note: did you mean struct here?
class LogicalResult;
^~~~~
struct

/data/llvm-project/mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp:724:5: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result]
    rewriter.notifyMatchFailure(
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
mlir/include/mlir/Conversion/VectorToGPU/VectorToGPU.h
mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp