Skip to content

Commit ad4f065

Browse files
committed
IRGenDebugInfo: Replace an obsolete workaround with an assertion.
rdar://problem/21470869
1 parent 8df5ed5 commit ad4f065

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/IRGen/IRGenDebugInfo.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,11 +1032,8 @@ void IRGenDebugInfo::emitVariableDeclaration(
10321032
if (IsPiece) {
10331033
// Try to get the size from the type if possible.
10341034
auto StorageSize = getSizeFromExplosionValue(CI.getTargetInfo(), Piece);
1035-
// FIXME: The TypeInfo for bound generic enum types reports a
1036-
// type <{}> (with size 0) but a concrete instance may still
1037-
// have storage allocated for it. rdar://problem/21470869
1038-
if (!Dim.SizeInBits || (StorageSize && Dim.SizeInBits > StorageSize))
1039-
Dim.SizeInBits = StorageSize;
1035+
assert((Dim.SizeInBits != 0 || StorageSize != 0) &&
1036+
"zero-sized variable with nonzero storage size");
10401037

10411038
// FIXME: Occasionally we miss out that the Storage is actually a
10421039
// refcount wrapper. Silently skip these for now.

0 commit comments

Comments
 (0)