Skip to content

Commit 4172fcc

Browse files
committed
Revert "[MC][AsmParser] Diagnose improperly nested .cfi frames"
This reverts commit a405193. It broke: lld/test/COFF/gc-dwarf-eh.s
1 parent 94e8675 commit 4172fcc

File tree

2 files changed

+0
-34
lines changed

2 files changed

+0
-34
lines changed

llvm/lib/MC/MCParser/AsmParser.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ class AsmParser : public MCAsmParser {
125125
void *SavedDiagContext;
126126
std::unique_ptr<MCAsmParserExtension> PlatformParser;
127127
SMLoc StartTokLoc;
128-
std::optional<SMLoc> CFIStartProcLoc;
129128

130129
/// This is the current buffer index we're lexing from as managed by the
131130
/// SourceMgr object.
@@ -1950,11 +1949,6 @@ bool AsmParser::parseStatement(ParseStatementInfo &Info,
19501949
Lex();
19511950
}
19521951

1953-
if (CFIStartProcLoc && Sym->isExternal())
1954-
return Error(StartTokLoc, "non-private labels cannot appear between "
1955-
".cfi_startproc / .cfi_endproc pairs") &&
1956-
Error(*CFIStartProcLoc, "previous .cfi_startproc was here");
1957-
19581952
if (discardLTOSymbol(IDVal))
19591953
return false;
19601954

@@ -4199,8 +4193,6 @@ bool AsmParser::parseDirectiveCFISections() {
41994193
/// parseDirectiveCFIStartProc
42004194
/// ::= .cfi_startproc [simple]
42014195
bool AsmParser::parseDirectiveCFIStartProc() {
4202-
CFIStartProcLoc = StartTokLoc;
4203-
42044196
StringRef Simple;
42054197
if (!parseOptionalToken(AsmToken::EndOfStatement)) {
42064198
if (check(parseIdentifier(Simple) || Simple != "simple",
@@ -4221,11 +4213,8 @@ bool AsmParser::parseDirectiveCFIStartProc() {
42214213
/// parseDirectiveCFIEndProc
42224214
/// ::= .cfi_endproc
42234215
bool AsmParser::parseDirectiveCFIEndProc() {
4224-
CFIStartProcLoc = std::nullopt;
4225-
42264216
if (parseEOL())
42274217
return true;
4228-
42294218
getStreamer().emitCFIEndProc();
42304219
return false;
42314220
}

llvm/test/MC/AArch64/cfi-bad-nesting.s

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)