Page MenuHomePhabricator

[mlir] Avoid pontentially ambiguous class name
ClosedPublic

Authored by Kayjukh on Tue, Jun 23, 5:30 AM.

Details

Summary

The Pass class exists in both the mlir and the llvm namespaces. Use the fully qualified class name to avoid any ambiguities.

Diff Detail

Event Timeline

Kayjukh created this revision.Tue, Jun 23, 5:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptTue, Jun 23, 5:30 AM
rriddle accepted this revision.Tue, Jun 23, 11:39 AM
This revision is now accepted and ready to land.Tue, Jun 23, 11:39 AM

Thanks.. I actually just ran into this the other day. I wonder if the standalone dialect example needs to get pushed into a separate namespace (I think it's still in mlir?) to find other places where there is an assumed namespace? I think all tablegen'd code would be alot safer if it always explicitly referred to MLIR classes through ::mlir.

Yes, it's still in the mlir namespace. Moving it out of mlir would probably help, but I don't think there is enough coverage in it right now to have a meaningful impact. The issue fixed in this patch would not have been detected for example, since there are no custom passes in examples/standalone yet.

This revision was automatically updated to reflect the committed changes.