OSDN Git Service

[mlir] Fix Windows build
authorNicolas Vasilache <ntv@google.com>
Fri, 29 May 2020 21:29:35 +0000 (17:29 -0400)
committerNicolas Vasilache <ntv@google.com>
Fri, 29 May 2020 22:55:21 +0000 (18:55 -0400)
Summary:
MSVC does not seem to like certain forward declarations.

https://reviews.llvm.org/D80728 introduces an error where
seemingly unrelated .cpp files that include the .h
(but do not otherwise use the class that depends on the forward declaration).

Instead of forward declaration, include the full vector ops definition.

Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, stephenneuendorffer, Joonsoo, grosul1, frgossen, Kayjukh, jurahul, llvm-commits

Tags: #llvm

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

mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h

index 2e6a859..fb8fc4c 100644 (file)
 #define DIALECT_LINALG_TRANSFORMS_TRANSFORMS_H_
 
 #include "mlir/Dialect/Linalg/Utils/Utils.h"
+#include "mlir/Dialect/Vector/VectorOps.h"
 #include "mlir/IR/PatternMatch.h"
 #include "llvm/ADT/SmallBitVector.h"
 
 namespace mlir {
-namespace vector {
-
-class TransferReadOp;
-class TransferWriteOp;
-
-} // namespace vector
-
 namespace linalg {
 
 struct LinalgTilingOptions;