ldc icon indicating copy to clipboard operation
ldc copied to clipboard

Add pragma(musttail)

Open MrSmith33 opened this issue 2 years ago • 4 comments

Discussed in https://github.com/ldc-developers/ldc/discussions/4355

Open questions:

  • pragma name. Is LDC_musttail what we want? Or we should use musttail?
  • Need to add tests.

MrSmith33 avatar Apr 06 '23 11:04 MrSmith33

Or we should use musttail?

I like that better - I assume GDC could implement it too.

kinke avatar Apr 06 '23 13:04 kinke

Wrt. a testcase, see e.g. https://github.com/ldc-developers/ldc/blob/master/tests/codegen/array_alloc_gh3041.d for a simple example checking the generated IR. The stuff in {{…}} is a regex. See https://llvm.org/docs/CommandGuide/FileCheck.html for the full reference if needed.

kinke avatar Apr 06 '23 15:04 kinke

@ibuclaw Can GDC implement this too (or does it already have it?) ?

JohanEngelen avatar Apr 06 '23 16:04 JohanEngelen

I like that better - I assume GDC could implement it too.

cc @ibuclaw

thewilsonator avatar Apr 07 '23 00:04 thewilsonator