[mlir][VectorOps] Fix more GCC5 weirdness
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 8 Sep 2020 13:40:14 +0000 (15:40 +0200)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 8 Sep 2020 13:41:39 +0000 (15:41 +0200)
VectorToSCF.cpp:515:47: error: specialization of 'template<class TransferOpTy> mlir::LogicalResult mlir::VectorTransferRewriter<TransferOpTy>::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&) const' in different namespace [-fpermissive]

mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp

index 0a74472..c0d283d 100644 (file)
@@ -497,6 +497,8 @@ static void emitWithBoundsChecks(
     inBoundsFun(scalarAccessExprs);
 }
 
+namespace mlir {
+
 /// Lowers TransferReadOp into a combination of:
 ///   1. local memory allocation;
 ///   2. perfect loop nest over:
@@ -666,8 +668,6 @@ LogicalResult VectorTransferRewriter<TransferWriteOp>::matchAndRewrite(
   return success();
 }
 
-namespace mlir {
-
 void populateVectorToSCFConversionPatterns(
     OwningRewritePatternList &patterns, MLIRContext *context,
     const VectorTransferToSCFOptions &options) {