llvm/test/MC/AsmParser
Paul Robinson fcfd4087ad Fix a crash with assembler source and -g.
llvm-mc or clang with -g normally produces debug info describing the
assembler source itself; however, if that source already contains some
.file/.loc directives, we should instead emit the debug info described
by those directives.  For certain assembler sources seen in the wild
(particularly in the Chrome build) this was causing a crash due to
incorrect assumptions about legal sequences of assembler source text.

Fixes PR38994.

Differential Revision: https://reviews.llvm.org/D63573

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364039 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-21 13:10:19 +00:00
..
AArch64 [AsmParser] Recommit: Hash is not a comment on some targets 2017-08-21 09:58:37 +00:00
Inputs [MC] - llvm-mc hangs on non-english characters. 2017-10-05 08:15:55 +00:00
align_invalid.s
altmacro_expression.s Fix test for altmacro 2017-05-01 14:00:54 +00:00
altmacro_string_escape.s [LLVM][inline-asm] Altmacro string escape character '!' 2017-05-10 13:08:11 +00:00
altmacro_string.s Correct compatibility with the GNU Assembler's handling of comparison ops 2018-05-14 05:25:36 +00:00
assembler-expressions-fail.s [MC] Change AsmParser to leverage Assembler during evaluation 2018-04-30 19:22:40 +00:00
assembler-expressions-inlineasm.ll [MC] Change AsmParser to leverage Assembler during evaluation 2018-04-30 19:22:40 +00:00
assembler-expressions.s [MC] Relax .fill size requirements 2018-05-18 17:45:48 +00:00
assignment.s Use .set instead of = when printing assignment in assembly output 2018-03-27 16:44:41 +00:00
at-pseudo-variable-bad.s [MC] Fix Error Location for ParseIdentifier 2016-10-12 13:58:07 +00:00
at-pseudo-variable.s
bad-macro.s
cfi-unfinished-frame.s
cfi-unknown-register.s [MC] Handle unknown literal register numbers in .cfi_* directives 2017-12-01 21:44:27 +00:00
cfi-window-save.s
comments-x86-darwin.s
conditional_asm.s
dash-n.s
debug-empty-source.s Move REQUIRES: line to the top 2018-06-26 17:44:23 +00:00
debug-no-source.s Move REQUIRES: line to the top 2018-06-26 17:44:23 +00:00
debug-only-comments.s [DWARF] Emit reasonable debug info for empty .s files. 2019-01-29 20:53:51 +00:00
defsym_error1.s
defsym_error2.s [llvm-mc] Make error handling more consistent. 2018-04-22 08:01:35 +00:00
defsym.s
directive_abort.s
directive_align.s [AsmParser][GAS-compatibility] Ignore an empty 'p2align' directive 2017-08-02 17:36:10 +00:00
directive_ascii.s
directive_cgprofile.s [MC] Add assembler support for .cg_profile. 2018-06-02 16:33:01 +00:00
directive_comm.s
directive_darwin_section.s
directive_dc.s [MC] Support .dc directives in assembler parser 2016-08-23 21:34:53 +00:00
directive_dcb.s [MC] Support .dcb directives in assembler parser 2016-09-23 19:25:15 +00:00
directive_desc.s
directive_ds.s [MC] Support .ds directives in assembler parser 2016-09-23 21:53:36 +00:00
directive_elf_size.s
directive_end-2.s [llvm-readobj] Change -t to --symbols in tests. NFC 2019-05-01 09:28:24 +00:00
directive_end.s [llvm-readobj] Change -t to --symbols in tests. NFC 2019-05-01 09:28:24 +00:00
directive_file-2.s [DWARF] Fix mixing assembler -g with DWARF .file directives. 2018-03-22 15:48:01 +00:00
directive_file-3.s [debuginfo] generate debug info with asm+.file 2018-08-28 16:23:39 +00:00
directive_file-g.s Fix a crash with assembler source and -g. 2019-06-21 13:10:19 +00:00
directive_file.s
directive_fill_2.s [MC] Relax .fill size requirements 2018-05-18 17:45:48 +00:00
directive_fill.s [MC] Relax .fill size requirements 2018-05-18 17:45:48 +00:00
directive_incbin.s [MC] Support skip and count for .incbin directive 2016-09-23 00:41:06 +00:00
directive_include.s Use .set instead of = when printing assignment in assembly output 2018-03-27 16:44:41 +00:00
directive_lcomm.s
directive_line.s
directive_loc.s
directive_lsym.s
directive_org.s
directive_print.s [AsmParser] Support GAS's .print directive 2017-10-02 14:36:31 +00:00
directive_rept-diagnostics.s
directive_rept.s [MC] Fix nested macro body parsing 2018-07-18 16:17:03 +00:00
directive_seh.s
directive_set.s Use .set instead of = when printing assignment in assembly output 2018-03-27 16:44:41 +00:00
directive_space.s Correct compatibility with the GNU Assembler's handling of comparison ops 2018-05-14 05:25:36 +00:00
directive_subsections_via_symbols.s
directive_symbol_attrs.s
directive_tbss.s
directive_tdata.s
directive_thread_init_func.s
directive_tlv.s
directive_values.s
directive_zerofill.s
directive-err-diagnostics.s
directive-err.s
directive-warning.s
dollars-in-identifiers.s
dot-symbol-assignment-backwards.s [Assembler] Better error messages for .org directive 2016-12-14 10:43:58 +00:00
dot-symbol-assignment.s
dot-symbol-non-absolute.s
dot-symbol.s
empty-comment.s [MC] Fix compiler crash in AsmParser::Lex 2017-06-09 14:04:03 +00:00
equ.s [AsmParser] Diagnose empty symbol for .set directive 2016-12-01 18:00:36 +00:00
expr_symbol_modifiers.s
expr-shr.s
exprs-invalid.s [X86] Fix test/MC/AsmParser/exprs-invalid.s after rL336104 2018-07-02 14:13:27 +00:00
exprs.s Correct compatibility with the GNU Assembler's handling of comparison ops 2018-05-14 05:25:36 +00:00
extern.s
floating-literals.s [MC] Fix floating-point literal lexing. 2019-03-28 21:12:28 +00:00
hash-directive.s Refactor and cleanup Assembly Parsing / Lexing 2016-06-17 16:06:17 +00:00
hello.s
if-diagnostics.s
ifb.s
ifc.s
ifdef.s [MC] Do not consider .ifdef/.ifndef as a use 2019-01-28 19:32:08 +00:00
ifeqs-diagnostics.s
ifeqs.s
ifndef.s [MC] Do not consider .ifdef/.ifndef as a use 2019-01-28 19:32:08 +00:00
ifnes.s
incbin_abcd
include.ll Use .set instead of = when printing assignment in assembly output 2018-03-27 16:44:41 +00:00
inline_macro_duplication.ll Specify REQUIRES: default_triple in a few tests 2018-04-26 19:15:25 +00:00
inline-comments.ll Provide support for preserving assembly comments 2016-07-11 12:42:14 +00:00
invalid-asm-variant.s [MC] Make llvm-mc fail cleanly on invalid output asm variant. 2016-10-31 18:36:31 +00:00
invalid-input-assertion.s
labels.s Use .set instead of = when printing assignment in assembly output 2018-03-27 16:44:41 +00:00
line_with_hash.s
lit.local.cfg [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
macro_parsing.s Ignore Lexing errors in macro body definitions 2016-06-02 17:15:05 +00:00
macro-args.s Use .set instead of = when printing assignment in assembly output 2018-03-27 16:44:41 +00:00
macro-def-in-instantiation.s
macro-duplicate-params-names-err.s Move REQUIRES: line to the top 2018-06-26 17:44:23 +00:00
macro-err1.s
macro-exitm.s
macro-irp.s
macro-irpc.s
macro-max-depth.s [MC] Add command-line option to choose the max nest level in asm macros. 2016-07-27 05:51:56 +00:00
macro-qualifier-diagnostics.s
macro-qualifier.s
macro-rept-err1.s
macro-rept-err2.s
macro-rept.s
macros-argument-parsing-diagnostics.s
macros-argument-parsing.s
macros-darwin-vararg.s
macros-darwin.s
macros-gas.s
macros-parsing.s
negativ_altmacro_expression.s [X86] Fix incomplete handling of register-assigned variables in parsing. 2019-01-11 20:17:36 +00:00
negative_altmacro_string.s [LLVM][inline-asm][Altmacor] Altmacro string delimiter '<..>' 2017-05-04 10:37:00 +00:00
non-english-characters.s [MC] - llvm-mc hangs on non-english characters. 2017-10-05 08:15:55 +00:00
pr11865.s
pr28805.ll Revert r276895 "[MC][X86] Fix Intel Operand assembly parsing for .set ids" 2016-08-01 23:00:01 +00:00
pr28921.s Prevent out of order HashDirective lexing in AsmLexer. 2016-10-03 13:48:27 +00:00
preserve-comments-crlf.s [AsmParser] Fix preserve-comments-crlf.s on FreeBSD 2018-07-26 06:07:03 +00:00
preserve-comments.s [MC] Cleanup Error Handling in AsmParser 2016-07-18 15:24:03 +00:00
purgem.s
reassign.s
rename.s
section_names.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
section.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
secure_log_unique.s
seh-directive-errors.s [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
seh-unfinished-frame.s [MC] Suppress .Lcfi labels when emitting textual assembly 2017-10-10 00:57:36 +00:00
undefined-local-symbol.s
unfinished-op.s X86AsmParser: Do not process a non-existent token 2019-03-26 03:12:41 +00:00
uppercase-hex.s
vararg-default-value.s
vararg.s
variables-invalid.s
variables.s