diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-02-23 00:01:32 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-02-23 00:01:32 +0000 |
commit | 8d22abdd59b1bf7cc3e7a45891f7a96dca0c18d6 (patch) | |
tree | 682c7bc4a6173d7eb8d05e92d081dbf308bf00cc /llvm/lib/AsmParser/LLParser.cpp | |
parent | a1d3637f3d8a4f57c491bb055a4019651e72bed9 (diff) | |
download | bcm5719-llvm-8d22abdd59b1bf7cc3e7a45891f7a96dca0c18d6.tar.gz bcm5719-llvm-8d22abdd59b1bf7cc3e7a45891f7a96dca0c18d6.zip |
AsmParser: Call instructions can't have an alignment
llvm-svn: 230193
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index b009dae1880..f8eb1305ccd 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -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); |