DataLayout: Report when the preferred alignment is less than the ABI
llvm-svn: 228819
This commit is contained in:
parent
d7677e7a8d
commit
04578fcfa5
|
@ -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;
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
|
||||
target datalayout = "i64:64:16"
|
||||
; CHECK: Preferred alignment cannot be less than the ABI alignment
|
Loading…
Reference in New Issue