[clang] [CIR] Wire const goto labels into indirect branch (PR #201644)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 24 17:21:00 PDT 2026


================
@@ -1564,6 +1576,11 @@ void CIRGenFunction::instantiateIndirectGotoBlock() {
                           {builder.getUnknownLoc()});
 }
 
+void CIRGenFunction::takeAddressOfConstantLabel(cir::BlockAddrInfoAttr info) {
+  constBlockAddressLabels.push_back(info);
+  instantiateIndirectGotoBlock();
----------------
andykaylor wrote:

I'm not sure we should be doing this here. I see that we have code to mark the indirect goto block as poison if it has no predecessor, but why don't we just wait until we see an indirect goto statement to instantiate it?

https://github.com/llvm/llvm-project/pull/201644


More information about the cfe-commits mailing list