From e035cf9ce4911d860f2ea972e6703052a9723aea Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Mon, 27 Jan 2014 17:20:25 +0000 Subject: 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 llvm-svn: 200227 --- llvm/lib/MC/MCParser/AsmParser.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'llvm/lib/MC/MCParser/AsmParser.cpp') diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index a1d016261f5..10f4fbb04ef 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -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; } -- cgit v1.2.3