summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DataLayout.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-02-11 09:13:09 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-02-11 09:13:09 +0000
commit04578fcfa5db449006766391f0f397069d14598b (patch)
tree781a4dc4f325f82b1c4fb070783ede8b38be21b9 /llvm/lib/IR/DataLayout.cpp
parentd7677e7a8d3bdcce751a37deabe35533a9018759 (diff)
downloadbcm5719-llvm-04578fcfa5db449006766391f0f397069d14598b.tar.gz
bcm5719-llvm-04578fcfa5db449006766391f0f397069d14598b.zip
DataLayout: Report when the preferred alignment is less than the ABI
llvm-svn: 228819
Diffstat (limited to 'llvm/lib/IR/DataLayout.cpp')
-rw-r--r--llvm/lib/IR/DataLayout.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/IR/DataLayout.cpp b/llvm/lib/IR/DataLayout.cpp
index cde393777a6..0dcc8427dcd 100644
--- a/llvm/lib/IR/DataLayout.cpp
+++ b/llvm/lib/IR/DataLayout.cpp
@@ -312,6 +312,9 @@ void DataLayout::parseSpecifier(StringRef Desc) {
PrefAlign = inBytes(getInt(Tok));
}
+ if (ABIAlign > PrefAlign)
+ report_fatal_error(
+ "Preferred alignment cannot be less than the ABI alignment");
setAlignment(AlignType, ABIAlign, PrefAlign, Size);
break;
OpenPOWER on IntegriCloud