[clang] [llvm] [MC] Remove UseAssemblerInfoForParsing (PR #91082)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Tue May 7 09:46:08 PDT 2024


MaskRay wrote:

This PR will address a Linux kernel need.
https://lore.kernel.org/all/CAFP8O3JkgQsH-4Lmr2W_teuvLjOCPi1htr9r3CO1O0yLyw=Azg@mail.gmail.com/

The code already assembles with `clang -S -fno-integrated-as` and `gcc -c`,
and this patch is to make `clang -c` work by removeing an unnecessary restriction in MCObjectStreamer.

I plan on making separate, more nuanced changes to MCAsmStreamer in the future,
(https://github.com/llvm/llvm-project/issues/62520#issuecomment-2096643143),
but I believe it is not worth holding back the MCObjectStreamer improvement.

Do you think this description is clear? I can create a Discourse post, but given the specific nature and subtlety of integrated assemblers, there might be limited general interest.

BTW: `clang -c -save-temps` using an `.s` immediate file and MCAsmStreamer 
inherently has some differences with `clang -c` using MCObjectStreamer.
For example, I've fixed a debug info issue https://github.com/llvm/llvm-project/pull/75022
and some clangDriver stuff I forget now.


https://github.com/llvm/llvm-project/pull/91082


More information about the cfe-commits mailing list