[PATCH] D114330: [asm] Merge EmitMSInlineAsmStr() and EmitGCCInlineAsmStr()

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 20 19:50:02 PST 2021


thakis created this revision.
thakis added a reviewer: hans.
Herald added a subscriber: hiraditya.
thakis requested review of this revision.
Herald added a project: LLVM.

This basically reverts 1778831a3d1, which split them.
Since they were split 9 years ago, EmitGCCInlineAsmStr() grew a bunch of
features that usually weren't added to EmitMSInlineAsmStr(), and
that was usually a mistake.  D71677 <https://reviews.llvm.org/D71677>, D113932 <https://reviews.llvm.org/D113932>, D114167 <https://reviews.llvm.org/D114167> are all examples
of where things were backported to EmitMSInlineAsmStr().

The names were also not great. EmitMSInlineAsmStr() used to be called for `asm
inteldialect`, which clang produces for Microsoft-style __asm { ... } blocks as
well for GCC-style __asm__ / asm statements with -masm=intel. On the other hand,
EmitGCCInlineAsmStr() used to be called for `asm`, whic clang produces for
GCC-style __asm__ / asm statements with -masm=att (the default).

It's also less code (23 insertions, 188 deletions).

No behavior change.


https://reviews.llvm.org/D114330

Files:
  llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114330.388740.patch
Type: text/x-patch
Size: 9968 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211121/d41b7f58/attachment.bin>


More information about the llvm-commits mailing list