From abdd726ce52ddbb3e820579eb636612d39f09896 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 6 Jan 2014 21:40:24 +0000 Subject: Improve documentation of the 'a' specifier and the ':' align pair. llvm-svn: 198636 --- llvm/lib/IR/DataLayout.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/IR/DataLayout.cpp') diff --git a/llvm/lib/IR/DataLayout.cpp b/llvm/lib/IR/DataLayout.cpp index ee2b4bc4e7b..c9e95b40215 100644 --- a/llvm/lib/IR/DataLayout.cpp +++ b/llvm/lib/IR/DataLayout.cpp @@ -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)); -- cgit v1.2.3