summaryrefslogtreecommitdiff
path: root/lib/IR/DataLayout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/IR/DataLayout.cpp')
-rw-r--r--lib/IR/DataLayout.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/IR/DataLayout.cpp b/lib/IR/DataLayout.cpp
index ee2b4bc4e7..c9e95b4021 100644
--- a/lib/IR/DataLayout.cpp
+++ b/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));