mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This patch adds SIL-level debug info support for variables whose static type is rewritten by an optimizer transformation. When a function is (generic-)specialized or inlined, the static types of inlined variables my change as they are remapped into the generic environment of the inlined call site. With this patch all inlined SILDebugScopes that point to functions with a generic signature are recursively rewritten to point to clones of the original function with new unique mangled names. The new mangled names consist of the old mangled names plus the new substituions, similar (or exactly, respectively) to how generic specialization is handled. On libSwiftCore.dylib (x86_64), this yields a 17% increase in unique source vars and a ~24% increase in variables with a debug location. rdar://problem/28859432 rdar://problem/34526036