[all-commits] [llvm/llvm-project] 2fb3c0: [asm] Merge EmitMSInlineAsmStr() and EmitGCCInline...

Nico Weber via All-commits all-commits at lists.llvm.org
Mon Nov 22 08:58:11 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2fb3c05b34a061cddd757b4c39b6095acf42e9f4
      https://github.com/llvm/llvm-project/commit/2fb3c05b34a061cddd757b4c39b6095acf42e9f4
  Author: Nico Weber <thakis at chromium.org>
  Date:   2021-11-22 (Mon, 22 Nov 2021)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp

  Log Message:
  -----------
  [asm] Merge EmitMSInlineAsmStr() and EmitGCCInlineAsmStr()

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, D113932, 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.

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




More information about the All-commits mailing list