This is an archive of the discontinued LLVM Phabricator instance.

[asm] Merge EmitMSInlineAsmStr() and EmitGCCInlineAsmStr()
ClosedPublic

Authored by thakis on Nov 20 2021, 7:49 PM.

Details

Summary

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.

Diff Detail

Event Timeline

thakis created this revision.Nov 20 2021, 7:49 PM
thakis requested review of this revision.Nov 20 2021, 7:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 20 2021, 7:49 PM
hans accepted this revision.Nov 22 2021, 5:59 AM

nice!

This revision is now accepted and ready to land.Nov 22 2021, 5:59 AM
This revision was automatically updated to reflect the committed changes.