[clang] [Clang] Fix unnecessary extra return block emmited during function epilog after musttail call (PR #134282)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 3 12:12:52 PDT 2025


https://github.com/efriedma-quic commented:

There's a comment in CodeGenFunction::EmitReturnBlock that says:

```
  // FIXME: We are at an unreachable point, there is no reason to emit the block
  // unless it has uses. However, we still need a place to put the debug
  // region.end for now.
```

Is that out of date?

----

Note that for most functions, we actually emit the return block, then erase it if it's unused. (See the end of CodeGenFunction::FinishFunction).

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


More information about the cfe-commits mailing list