mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-03 01:12:53 +00:00
DataLayout: Report when the preferred alignment is less than the ABI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228819 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f937622ece
commit
70fe9c6346
@ -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;
|
||||
|
3
test/Assembler/invalid-datalayout14.ll
Normal file
3
test/Assembler/invalid-datalayout14.ll
Normal file
@ -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
Block a user