MC: Add support for .cfi_startproc simple

This commit allows LLVM MC to process .cfi_startproc directives when
they are followed by an additional `simple' identifier. This signals to
elide the emission of target specific CFI instructions that would
normally occur initially.

This fixes PR16587.

Differential Revision: http://llvm-reviews.chandlerc.com/D2624


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200227 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Majnemer
2014-01-27 17:20:25 +00:00
parent bb0bb73da1
commit 0fd23cd6c2
8 changed files with 49 additions and 23 deletions

View File

@ -2796,9 +2796,14 @@ bool AsmParser::parseDirectiveCFISections() {
}
/// parseDirectiveCFIStartProc
/// ::= .cfi_startproc
/// ::= .cfi_startproc [simple]
bool AsmParser::parseDirectiveCFIStartProc() {
getStreamer().EmitCFIStartProc();
StringRef Simple;
if (getLexer().isNot(AsmToken::EndOfStatement))
if (parseIdentifier(Simple) || Simple != "simple")
return TokError("unexpected token in .cfi_startproc directive");
getStreamer().EmitCFIStartProc(!Simple.empty());
return false;
}