llvm-project/llvm/lib/MC/MCParser
Nirav Dave 6c0665e221 [MC] Change AsmParser to leverage Assembler during evaluation
Teach AsmParser to check with Assembler for when evaluating constant
expressions.  This improves the handing of preprocessor expressions
that must be resolved at parse time. This idiom can be found as
assembling-time assertion checks in source-level assemblers. Note that
this relies on the MCStreamer to keep sufficient tabs on Section /
Fragment information which the MCAsmStreamer does not. As a result the
textual output may fail where the equivalent object generation would
pass. This can most easily be resolved by folding the MCAsmStreamer
and MCObjectStreamer together which is planned for in a separate
patch.

Currently, this feature is only enabled for assembly input, keeping IR
compilation consistent between assembly and object generation.

Reviewers: echristo, rnk, probinson, espindola, peter.smith

Reviewed By: peter.smith

Subscribers: eraman, peter.smith, arichardson, jyknight, hiraditya, llvm-commits

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

llvm-svn: 331218
2018-04-30 19:22:40 +00:00
..
AsmLexer.cpp [MC] Fix regression tests on Windows when git “core.autocrlf” is set to true. 2017-11-17 21:59:43 +00:00
AsmParser.cpp [MC] Change AsmParser to leverage Assembler during evaluation 2018-04-30 19:22:40 +00:00
CMakeLists.txt
COFFAsmParser.cpp Reland "Emit Function IDs table for Control Flow Guard" 2018-01-09 23:49:30 +00:00
DarwinAsmParser.cpp Make helpers static. No functionality change. 2017-12-24 12:46:22 +00:00
ELFAsmParser.cpp Reflow formatting after previous NFC commit. 2018-04-24 01:57:03 +00:00
LLVMBuild.txt
MCAsmLexer.cpp [Asm] Refactor debug printing of AsmToken 2018-03-06 14:02:14 +00:00
MCAsmParser.cpp IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
MCAsmParserExtension.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-10 01:33:54 +00:00
MCTargetAsmParser.cpp [Asm] Add debug tracing in table-generated assembly matcher 2017-10-11 09:17:43 +00:00