[MC] Allow .cfi_sections with empty section list
authorFangrui Song <i@maskray.me>
Fri, 26 Feb 2021 06:29:49 +0000 (22:29 -0800)
committerFangrui Song <i@maskray.me>
Fri, 26 Feb 2021 06:29:49 +0000 (22:29 -0800)
commit880c9c56c1172418853cc81eeced492b4f0cefc2
treeca598c80b15939dfa05129a7fcf510496811c8e3
parent8459b8ef39f4d745f2aab8c43821b3389b0e5a74
[MC] Allow .cfi_sections with empty section list

GNU as supports this. This mode silently ignores
.cfi_startproc/.cfi_endproc and .cfi_* in between.

Also drop a diagnostic `in '.cfi_sections' directive`: the diagnostic
already includes the line and it is clear the line is a `.cfi_sections` directive.
llvm/lib/MC/MCParser/AsmParser.cpp
llvm/lib/MC/MCStreamer.cpp
llvm/test/MC/ELF/cfi-sections-empty.s [new file with mode: 0644]
llvm/test/MC/ELF/cfi.s