mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
IRGenDebugInfo: Replace an obsolete workaround with an assertion.
rdar://problem/21470869
This commit is contained in:
@@ -1032,11 +1032,8 @@ void IRGenDebugInfo::emitVariableDeclaration(
|
|||||||
if (IsPiece) {
|
if (IsPiece) {
|
||||||
// Try to get the size from the type if possible.
|
// Try to get the size from the type if possible.
|
||||||
auto StorageSize = getSizeFromExplosionValue(CI.getTargetInfo(), Piece);
|
auto StorageSize = getSizeFromExplosionValue(CI.getTargetInfo(), Piece);
|
||||||
// FIXME: The TypeInfo for bound generic enum types reports a
|
assert((Dim.SizeInBits != 0 || StorageSize != 0) &&
|
||||||
// type <{}> (with size 0) but a concrete instance may still
|
"zero-sized variable with nonzero storage size");
|
||||||
// have storage allocated for it. rdar://problem/21470869
|
|
||||||
if (!Dim.SizeInBits || (StorageSize && Dim.SizeInBits > StorageSize))
|
|
||||||
Dim.SizeInBits = StorageSize;
|
|
||||||
|
|
||||||
// FIXME: Occasionally we miss out that the Storage is actually a
|
// FIXME: Occasionally we miss out that the Storage is actually a
|
||||||
// refcount wrapper. Silently skip these for now.
|
// refcount wrapper. Silently skip these for now.
|
||||||
|
|||||||
Reference in New Issue
Block a user