Improve documentation of the 'a' specifier and the '<abi>:<pref>' align pair.
[oota-llvm.git] / lib / IR / DataLayout.cpp
index ee2b4bc4e7bcaa3739655bbeb2b59cc9d2b92a97..c9e95b40215607cacba0bae053cdf49934d72198 100644 (file)
@@ -287,6 +287,9 @@ void DataLayout::parseSpecifier(StringRef Desc) {
       // Bit size.
       unsigned Size = Tok.empty() ? 0 : getInt(Tok);
 
+      assert((AlignType != AGGREGATE_ALIGN || Size == 0) &&
+             "These specifications don't have a size");
+
       // ABI alignment.
       Split = split(Rest, ':');
       unsigned ABIAlign = inBytes(getInt(Tok));