[Mlir-commits] [mlir] 8666000 - [NFC][mlir] Fully qualify namespace to avoid an MSVC bug (#152860)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sat Aug 9 18:11:38 PDT 2025


Author: yronglin
Date: 2025-08-10T09:11:34+08:00
New Revision: 86660009ec22119782bde1acfad77f7b4c93ebce

URL: https://github.com/llvm/llvm-project/commit/86660009ec22119782bde1acfad77f7b4c93ebce
DIFF: https://github.com/llvm/llvm-project/commit/86660009ec22119782bde1acfad77f7b4c93ebce.diff

LOG: [NFC][mlir] Fully qualify namespace to avoid an MSVC bug (#152860)

VS17.6 has a name lookup issue, and was fixed in VS17.7, it impact down
stream MLIR based project. This MR add full qualifiers to workaround
this issue.
Reproducer: https://godbolt.org/z/Ea6e1Kc3E

Signed-off-by: yronglin <yronglin777 at gmail.com>

Added: 
    

Modified: 
    mlir/include/mlir/IR/PatternMatch.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/IR/PatternMatch.h b/mlir/include/mlir/IR/PatternMatch.h
index b5a93a0c5a898..57e73c1d8c7c1 100644
--- a/mlir/include/mlir/IR/PatternMatch.h
+++ b/mlir/include/mlir/IR/PatternMatch.h
@@ -311,14 +311,14 @@ struct OpOrInterfaceRewritePatternBase : public RewritePattern {
 /// opposed to a raw Operation.
 template <typename SourceOp>
 struct OpRewritePattern
-    : public detail::OpOrInterfaceRewritePatternBase<SourceOp> {
+    : public mlir::detail::OpOrInterfaceRewritePatternBase<SourceOp> {
 
   /// Patterns must specify the root operation name they match against, and can
   /// also specify the benefit of the pattern matching and a list of generated
   /// ops.
   OpRewritePattern(MLIRContext *context, PatternBenefit benefit = 1,
                    ArrayRef<StringRef> generatedNames = {})
-      : detail::OpOrInterfaceRewritePatternBase<SourceOp>(
+      : mlir::detail::OpOrInterfaceRewritePatternBase<SourceOp>(
             SourceOp::getOperationName(), benefit, context, generatedNames) {}
 };
 
@@ -327,10 +327,10 @@ struct OpRewritePattern
 /// of a raw Operation.
 template <typename SourceOp>
 struct OpInterfaceRewritePattern
-    : public detail::OpOrInterfaceRewritePatternBase<SourceOp> {
+    : public mlir::detail::OpOrInterfaceRewritePatternBase<SourceOp> {
 
   OpInterfaceRewritePattern(MLIRContext *context, PatternBenefit benefit = 1)
-      : detail::OpOrInterfaceRewritePatternBase<SourceOp>(
+      : mlir::detail::OpOrInterfaceRewritePatternBase<SourceOp>(
             Pattern::MatchInterfaceOpTypeTag(), SourceOp::getInterfaceID(),
             benefit, context) {}
 };


        


More information about the Mlir-commits mailing list