Skip to content

Commit efca772

Browse files
dtzSiFiveyoungar
andcommitted
[FIRRTL][PrefixModules][NFC] Use else-if in dyn_cast chain.
Co-authored-by: Andrew Young <youngar17@gmail.com>
1 parent c6ece8d commit efca772

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Dialect/FIRRTL/Transforms/PrefixModules.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,9 @@ void PrefixModulesPass::runOnOperation() {
478478
for (auto &node : llvm::inverse_post_order_ext(current, visited)) {
479479
if (auto module = dyn_cast<FModuleOp>(*node->getModule()))
480480
renameModule(module);
481-
if (auto extModule = dyn_cast<FExtModuleOp>(*node->getModule()))
481+
else if (auto extModule = dyn_cast<FExtModuleOp>(*node->getModule()))
482482
renameExtModule(extModule);
483-
if (auto memModule = dyn_cast<FMemModuleOp>(*node->getModule()))
483+
else if (auto memModule = dyn_cast<FMemModuleOp>(*node->getModule()))
484484
renameMemModule(memModule);
485485
}
486486
}

0 commit comments

Comments
 (0)