[PATCH] D120897: [flang] Remove 'using namespace mlir;` from header files
Valentin Clement via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 3 13:56:43 PST 2022
clementval added inline comments.
================
Comment at: flang/include/flang/Optimizer/Dialect/FIROpsSupport.h:20
inline bool nonVolatileLoad(mlir::Operation *op) {
- if (auto load = dyn_cast<fir::LoadOp>(op))
+ if (auto load = llvm::dyn_cast<fir::LoadOp>(op))
return !load->getAttr("volatile");
----------------
it's probably `mlir::dyn_cast` here.
================
Comment at: flang/include/flang/Optimizer/Dialect/FIROpsSupport.h:27
inline bool isaCall(mlir::Operation *op) {
- return isa<fir::CallOp>(op) || isa<fir::DispatchOp>(op) ||
- isa<mlir::func::CallOp>(op) || isa<mlir::func::CallIndirectOp>(op);
+ return llvm::isa<fir::CallOp>(op) || llvm::isa<fir::DispatchOp>(op) ||
+ llvm::isa<mlir::func::CallOp>(op) ||
----------------
`mlir::isa`
================
Comment at: flang/lib/Lower/Bridge.cpp:42
+using namespace mlir;
+
----------------
Wouldn't it make more sense to just get rid of it since we want fully qualified names? Same for other places.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120897/new/
https://reviews.llvm.org/D120897
More information about the llvm-commits
mailing list