summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCParser/AsmParser.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-01-27 17:20:25 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-01-27 17:20:25 +0000
commite035cf9ce4911d860f2ea972e6703052a9723aea (patch)
tree8f794328095152a49d5f405bbbdb86ab8cc86806 /llvm/lib/MC/MCParser/AsmParser.cpp
parent1b0539c7f642d266536fb132bc5e7a49ec697cf9 (diff)
downloadbcm5719-llvm-e035cf9ce4911d860f2ea972e6703052a9723aea.tar.gz
bcm5719-llvm-e035cf9ce4911d860f2ea972e6703052a9723aea.zip
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
Diffstat (limited to 'llvm/lib/MC/MCParser/AsmParser.cpp')
-rw-r--r--llvm/lib/MC/MCParser/AsmParser.cpp9
1 files changed, 7 insertions, 2 deletions
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;
}
OpenPOWER on IntegriCloud