mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-27 04:18:42 +00:00
Teach DataLayout that ABI alignments for non-aggregate types must be non-zero.
This manifested as assertions and/or crashes in later phases of optimization, depending on the build configuration. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230939 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
1 parent
ddfdffbb10
commit
c7292fdabe
2 files changed
+9
No files matched your search
@@ -312,6 +312,9 @@ void DataLayout::parseSpecifier(StringRef Desc) {
|
||||
"Missing alignment specification in datalayout string");
|
||||
Split = split(Rest, ':');
|
||||
unsigned ABIAlign = inBytes(getInt(Tok));
|
||||
if (AlignType != AGGREGATE_ALIGN && !ABIAlign)
|
||||
report_fatal_error(
|
||||
"ABI alignment specification must be >0 for non-aggregate types");
|
||||
|
||||
// Preferred alignment.
|
||||
unsigned PrefAlign = ABIAlign;
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
|
||||
|
||||
target datalayout = "v128:0:128"
|
||||
|
||||
; CHECK: ABI alignment specification must be >0 for non-aggregate types
|
||||
|
||||
Reference in new issue
Block a user