Closed
Description
Consider the following global variable:
cir.global @x = #cir.const_struct<{
#cir.int<1> : !s32i,
}> : !ty_anon_struct {section = ".abc"}
On lowering, the {section = ".abc"}
attribute is ignored. That is because in LoweringToLLVM.cpp
, the function CIRToLLVMGlobalOpLowering::matchAndRewrite
can exit prematurely before the variable attributes
is used at the end of the function.
I'm not sure how to fix it -- I tried removing those early return
s, but it won't work and results in a crash.