mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
AsmParser: Call instructions can't have an alignment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230193 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
15cf92437a
commit
dad44db24c
@ -4732,10 +4732,14 @@ bool LLParser::ParseInvoke(Instruction *&Inst, PerFunctionState &PFS) {
|
||||
if (I != E)
|
||||
return Error(CallLoc, "not enough parameters specified for call");
|
||||
|
||||
if (FnAttrs.hasAttributes())
|
||||
if (FnAttrs.hasAttributes()) {
|
||||
if (FnAttrs.hasAlignmentAttr())
|
||||
return Error(CallLoc, "invoke instructions may not have an alignment");
|
||||
|
||||
Attrs.push_back(AttributeSet::get(RetType->getContext(),
|
||||
AttributeSet::FunctionIndex,
|
||||
FnAttrs));
|
||||
}
|
||||
|
||||
// Finish off the Attribute and check them
|
||||
AttributeSet PAL = AttributeSet::get(Context, Attrs);
|
||||
@ -5145,10 +5149,14 @@ bool LLParser::ParseCall(Instruction *&Inst, PerFunctionState &PFS,
|
||||
if (I != E)
|
||||
return Error(CallLoc, "not enough parameters specified for call");
|
||||
|
||||
if (FnAttrs.hasAttributes())
|
||||
if (FnAttrs.hasAttributes()) {
|
||||
if (FnAttrs.hasAlignmentAttr())
|
||||
return Error(CallLoc, "call instructions may not have an alignment");
|
||||
|
||||
Attrs.push_back(AttributeSet::get(RetType->getContext(),
|
||||
AttributeSet::FunctionIndex,
|
||||
FnAttrs));
|
||||
}
|
||||
|
||||
// Finish off the Attribute and check them
|
||||
AttributeSet PAL = AttributeSet::get(Context, Attrs);
|
||||
|
9
test/Assembler/call-invalid-1.ll
Normal file
9
test/Assembler/call-invalid-1.ll
Normal file
@ -0,0 +1,9 @@
|
||||
; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
declare void @f()
|
||||
|
||||
define void @g() {
|
||||
call void @f() align 8
|
||||
; CHECK: error: call instructions may not have an alignment
|
||||
ret void
|
||||
}
|
Loading…
Reference in New Issue
Block a user