llvm-project/clang/tools
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
..
arcmt-test [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
c-arcmt-test [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
c-index-test [index] Fix methods that take a shared_ptr to just take a reference. 2018-04-23 14:30:21 +00:00
clang-check Allow the creation of human-friendly ASTDumper to arbitrary output stream 2018-04-06 13:01:12 +00:00
clang-diff [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
clang-format Use InitLLVM in clang as well. 2018-04-13 20:57:57 +00:00
clang-format-vs clang-format plugin: Add missing semicolon in list of file extensions (PR36383) 2018-02-20 09:26:38 +00:00
clang-func-mapping [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
clang-fuzzer [clang-proto-to-cxx] Accept protobufs with missing fields. 2018-02-02 20:22:20 +00:00
clang-import-test Fix case of LLVM library names. 2018-04-23 15:41:08 +00:00
clang-offload-bundler Update for llvm change. NFC. 2018-02-14 19:11:37 +00:00
clang-refactor Revert "[Tooling] [0/1] Refactor FrontendActionFactory::create() to return std::unique_ptr<>" 2018-02-27 15:54:55 +00:00
clang-rename Make add_clang_tool() formatting a bit more consistent. 2018-04-24 01:30:44 +00:00
diag-build
diagtool Remove unused code (made unused by r161073, and later more so by r248043). 2018-04-23 15:26:15 +00:00
driver [MC] Change AsmParser to leverage Assembler during evaluation 2018-04-30 19:22:40 +00:00
libclang IWYU for llvm-config.h in clang. See r331124 for details. 2018-04-30 13:52:15 +00:00
scan-build Fix typos in clang 2018-04-06 15:14:32 +00:00
scan-build-py Fix typos in clang 2018-04-06 15:14:32 +00:00
scan-view Fix typos in clang 2018-04-06 15:14:32 +00:00
CMakeLists.txt Add Cross Translation Unit support library 2017-09-22 11:11:01 +00:00