-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[DebugInfo] Use underlying type of global variables with opaque type #80380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@swift-ci test |
lib/IRGen/IRGenDebugInfo.cpp
Outdated
@@ -3869,6 +3869,14 @@ void IRGenDebugInfoImpl::emitGlobalVariableDeclaration( | |||
if (Opts.DebugInfoLevel <= IRGenDebugInfoLevel::LineTables) | |||
return; | |||
|
|||
// If this global variable contains an opaque type, replace it with its | |||
// underlying type. | |||
if (auto UnderlyingType = IGM.substOpaqueTypesWithUnderlyingTypes( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
substOpaqueTypesWithUnderlyingTypes never returns null, so this if statement is always taken
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And it's a noop for all other types?
lib/IRGen/IRGenDebugInfo.cpp
Outdated
if (auto UnderlyingType = IGM.substOpaqueTypesWithUnderlyingTypes( | ||
DbgTy.getType()->getCanonicalType())) { | ||
auto &TI = IGM.getTypeInfoForUnlowered(UnderlyingType); | ||
DbgTy = DebugTypeInfo::getFromTypeInfo(UnderlyingType, TI, IGM); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we still don't want to do this all the time.
rdar://144881938