Manual-sync mirror of chromium.googlesource.com/external/github.com/llvm/llvm-project (bare monorepo, no subtree suffix)
Find a file
Stephen Tozer fc4aad7b5d
[Clang][Coroutines] Don't emit fake uses for coroutine parameters (#194690)
Fixes issue: https://github.com/llvm/llvm-project/issues/192351

The combination of coroutines with -fextend-variable-liveness has
resulted in use-after-free, caused by the fact that we insert fake uses
of coroutine parameters at the end of the coroutine. While this is fine
for normal functions, in coroutines these variables are stored in the
coroutine frame, which is freed before the end of the function; this
results in us loading from the deleted frame.

This patch fixes this by no longer emitting fake uses for most coroutine
parameters. Since coroutine parameters will be saved back to the frame
when we suspend, and currently may not be optimized out, fake uses are
not needed in this case, and so by not emitting them we avoid dealing
with the complexity of updating fake uses in the CoroSplit pass. The
exception to this is 'this', which is not saved to the frame.

(cherry picked from commit efb01c1bf5)
2026-05-14 07:31:46 +00:00
.ci [green dragon] add stage1-RA job to release/22.x 2026-03-06 18:42:38 +00:00
.github workflows/release-binaries: Pass missing release-version input to upload-release-artifact (#180879) 2026-02-16 09:01:46 +00:00
bolt [BOLT] Avoid UB due to misaligned access. (#174990) 2026-01-10 03:45:13 +00:00
clang [Clang][Coroutines] Don't emit fake uses for coroutine parameters (#194690) 2026-05-14 07:31:46 +00:00
clang-tools-extra [clang-tidy] Add note about removal of hicpp module 2026-04-28 12:08:38 +08:00
cmake Bump version to 22.1.6 2026-05-05 18:55:01 +00:00
compiler-rt [compiler-rt][sanitizer] Remove linux/scc.h (#194116) 2026-04-28 03:29:14 +00:00
cross-project-tests [TEST][FIX] Fix typo in tool name: 'llvm-ar' 2026-02-18 08:19:19 +00:00
flang [Flang] Fix lowering failure for some constructs inside a CHANGE TEAM (#184342) 2026-04-06 18:30:01 +00:00
flang-rt [flang-rt] Fix system_clock scaling on MacOS (#176753) 2026-01-23 07:36:09 +00:00
libc [libc] Fix unit test dependency and respect LIBC_INCLUDE_BENCHMARKS (#180812) 2026-02-12 07:59:24 +00:00
libclc [Backport][Clang] Rename uinc_wrap and add normal atomic builtin 2026-02-05 08:04:18 +00:00
libcxx Bump version to 22.1.6 2026-05-05 18:55:01 +00:00
libcxxabi [libc++][NFC] Refactor _LIBCPP_OVERRIDABLE_FUNCTION to be a normal attribute macro (#174964) 2026-01-09 12:07:42 +01:00
libsycl [libsycl] fix license link in README.md. 2025-12-01 16:34:37 -05:00
libunwind [libunwind] fix build errors on x32 and mips n32 (#194310) 2026-05-04 16:55:02 +00:00
lld [LLD][ELF] Fix performance regression when using linker scripts (#194668) 2026-05-01 03:59:37 +00:00
lldb [lldb-dap] Fix crash in source request handler (#195847) 2026-05-07 20:11:10 +00:00
llvm [DAGTypeLegalizer] Add missing BR_CC handler for soft-promoted half operands (#196214) 2026-05-09 07:04:58 +00:00
llvm-libgcc
mlir [MLIR][SCFToOpenMP] Fix crash when lowering vector reductions (#173978) 2026-01-15 09:49:53 +00:00
offload [NFC][Offload] Rename a function (#175673) 2026-01-12 19:40:17 -06:00
openmp [OpenMP][OMPT] Revert control_tool.c changes from #191429 (#192069) 2026-04-20 07:09:55 +00:00
orc-rt [orc-rt] Add Maintainers.md. (#175691) 2026-01-13 12:08:27 +11:00
polly [Polly][ScopInfo] Lazy Scop instantiation (#179535) 2026-02-23 08:31:55 +00:00
runtimes [libc++] Enable -Wmissing-prototypes (#116261) 2025-12-16 11:25:07 +01:00
third-party [Benchmark] Fix warnings around usage of __COUNTER__ (#184524) 2026-03-05 14:33:27 +00:00
utils/bazel Fix Bazel build for e289b2e (#175642) 2026-01-12 15:52:31 -05:00
.clang-format Enforce Unix line endings for Clang/LLVM/MLIR projects (#161460) 2025-10-02 06:09:12 -07:00
.clang-format-ignore Add empty top level .clang-format-ignore (#136022) 2025-04-16 15:48:30 -07:00
.clang-tidy Add default empty header filter regex to root .clang-tidy (#167386) 2025-11-11 01:36:25 +03:00
.git-blame-ignore-revs [clang-tidy][NFC] Add clang-tidy formatting commit to .git-blame-ignore-revs (#167126) 2025-11-20 21:42:10 +08:00
.gitattributes [libclang/python] Enable packaging clang python bindings (#125806) 2025-11-24 17:21:24 -08:00
.gitignore [LLVM] Ignore two Cursor specific files. (#175683) 2026-01-13 02:27:05 +01:00
.mailmap [mailmap] Update my name 2025-04-14 16:54:14 +08:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md [www][docs] Remove last mentions of IRC (#139076) 2025-05-08 09:40:33 -04:00
LICENSE.TXT
pyproject.toml [lldb] Configure pyright to the documented minimum python version (#162952) 2025-11-20 10:30:22 -08:00
README.md
SECURITY.md

The LLVM Compiler Infrastructure

OpenSSF Scorecard OpenSSF Best Practices libc++

Welcome to the LLVM project!

This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.

The LLVM project has multiple components. The core of the project is itself called "LLVM". This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.

C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.

Other components include: the libc++ C++ standard library, the LLD linker, and more.

Getting the Source Code and Building LLVM

Consult the Getting Started with LLVM page for information on building and running LLVM.

For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.

Getting in touch

Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.

The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.