mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Debug Info: Do not crash when the size of a piece cannot be determined.
Swift SVN r17958
This commit is contained in:
@@ -974,6 +974,8 @@ void IRGenDebugInfo::emitVariableDeclaration(IRBuilder& Builder,
|
||||
llvm::RoundUpToAlignment(Dim.Size, Dim.Align) / SizeOfByte;
|
||||
|
||||
assert(Offset*8+Dim.Size<=Var.getSizeInBits(DIRefMap) && "pars > totum");
|
||||
if (Size == 0)
|
||||
break;
|
||||
Var = DBuilder.createVariablePiece(Descriptor, Offset, Size);
|
||||
Offset += Size;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user