[AsmParser] Add source location to all errors related to .cfi directives
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Wed, 11 Nov 2020 14:27:01 +0000 (14:27 +0000)
committerAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Wed, 11 Nov 2020 17:00:07 +0000 (17:00 +0000)
commitfb9942f87628101e1d72da1942416189b8f43825
treeda99ef80897c3201243f2f98ac7bc4205694b5db
parent3df3b62018c0015b0786b124827c276e8ee57117
[AsmParser] Add source location to all errors related to .cfi directives

I was trying to add .cfi_ annotations to assembly code in the FreeBSD
kernel and changed a macro that then resulted in incorrectly nested
directives. However, clang's diagnostics said the error was happening at
<unknown>:0. This addresses one of the TODOs added in D51695.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D89787
llvm/include/llvm/MC/MCStreamer.h
llvm/lib/MC/MCParser/AsmParser.cpp
llvm/lib/MC/MCParser/MasmParser.cpp
llvm/lib/MC/MCStreamer.cpp
llvm/test/MC/X86/cfi-open-within-another-crash.s
llvm/test/MC/X86/cfi-scope-errors.s
llvm/test/MC/X86/cfi-scope-unclosed.s [deleted file]