Skip to content

Commit c9202fd

Browse files
committed
Lower-to-hw: use getParentOfType to find parent module op
1 parent 0dfc3a5 commit c9202fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Conversion/FIRRTLToHW/LowerToHW.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3709,7 +3709,7 @@ LogicalResult FIRRTLLowering::visitDecl(InstanceOp oldInstance) {
37093709

37103710
if (newInstance.getInnerSymAttr())
37113711
if (auto forceName = circuitState.instanceForceNames.lookup(
3712-
{cast<hw::HWModuleOp>(newInstance->getParentOp()).getNameAttr(),
3712+
{newInstance->getParentOfType<hw::HWModuleOp>().getNameAttr(),
37133713
newInstance.getInnerNameAttr()}))
37143714
newInstance->setAttr("hw.verilogName", forceName);
37153715

0 commit comments

Comments
 (0)