llvm-project/llvm/lib/MC/MCParser
Anirudh Prasad 2dca0b5a1c [AsmParser][SystemZ][z/OS] Fix hanging scenario in HLASMAsmParser class
- In the caller of the overridden `parseStatement` function (i.e. the `AsmParser::Run()`) in the case of an error **and** if we're not at the start of the statement, we "eat" up until the end of the current statement, so we don't have to process it again.
- However, in the HLASMAsmParser class what's happening is that, if an error occurs at the very start of the statement (for example, you invoke the HLASMAsmParser to parse a gnu directive), we will error out, but we never really progress in terms of the next token in the statement to parse. We simply keep looping processing the same error over and over again (partly because we're at the start of the statement)
- To remedy this, when the `parseAsHLASMLabel` function fails, before returning, we "eat" until the end of the statement function, so we don't process it anymore.

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D104869
2021-06-28 12:47:08 -04:00
..
AsmLexer.cpp [AsmParser][SystemZ][z/OS] Reject character and string literals for HLASM 2021-05-05 10:21:55 -04:00
AsmParser.cpp [AsmParser][SystemZ][z/OS] Fix hanging scenario in HLASMAsmParser class 2021-06-28 12:47:08 -04:00
CMakeLists.txt llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
COFFAsmParser.cpp [MC] Untangle MCContext and MCObjectFileInfo 2021-05-05 10:03:02 -07:00
COFFMasmParser.cpp [llvm] Rename StringRef _lower() method calls to _insensitive() 2021-06-25 00:22:01 +03:00
DarwinAsmParser.cpp [MC] Untangle MCContext and MCObjectFileInfo 2021-05-05 10:03:02 -07:00
ELFAsmParser.cpp [LTO][MC] Discard non-prevailing defined symbols in module-level assembly 2021-03-18 15:33:42 -07:00
MCAsmLexer.cpp
MCAsmParser.cpp [MC] Add parseEOL() overload and migrate some parseToken(AsmToken::EndOfStatement) to parseEOL() 2021-03-06 17:45:23 -08:00
MCAsmParserExtension.cpp [COFF] Add cg_profile directive and .llvm.call-graph-profile section 2020-07-10 17:07:30 -07:00
MCTargetAsmParser.cpp
MasmParser.cpp [ms] [llvm-ml] Add support for ALIGN, EVEN, and ORG directives 2021-06-25 17:19:45 -04:00
WasmAsmParser.cpp [WebAssembly] Add TLS data segment flag: WASM_SEG_FLAG_TLS 2021-05-12 13:31:02 -07:00