mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Currently the SROA just overwrites already-existing expressions on variables. When SROA is recursively run on a data structure this leads to nonsensical expressions such as type $*Outer, expr op_fragment:#Inner.x instead of type $*Outer, expr op_fragment:#Outer.inner op_fragment:#Inner.x The (nonsensical) LLVM IR generated from this violates some assumptions in LLVM for example, if a struct has multiple members of the same type, you can end up with multiple dbg.declare intrinsics claiming to describe the same variable). As a quick fix, this patch detects this situation and drops the debug info. A proper fix shouldn't be too difficult to implement though. rdar://99874371
12 KiB
12 KiB