Debug Info: Do not crash when the size of a piece cannot be determined.

Swift SVN r17958
This commit is contained in:
Adrian Prantl
2014-05-12 20:59:57 +00:00
parent 1e5b9116d4
commit baae246fb8

View File

@@ -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;
}