[all-commits] [llvm/llvm-project] eae3e9: [orc-rt] Fix move_only_function storing references...
Lang Hames via All-commits
all-commits at lists.llvm.org
Fri Sep 25 06:12:51 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: eae3e9e64de82ae5a162783808c89521cfea7742
https://github.com/llvm/llvm-project/commit/eae3e9e64de82ae5a162783808c89521cfea7742
Author: Lang Hames <lhames at gmail.com>
Date: 2026-09-25 (Fri, 25 Sep 2026)
Changed paths:
M orc-rt/include/orc-rt/support/move_only_function.h
M orc-rt/test/unit/support/move_only_function-test.cpp
Log Message:
-----------
[orc-rt] Fix move_only_function storing references to lvalue callables. (#226474)
move_only_function's converting constructor instantiated CallableImpl
with the deduced forwarding-reference type, so constructing from an
lvalue callable stored a reference to it rather than a copy, leaving the
move_only_function dangling once the original went out of scope.
This commit decays the callable type before instantiating CallableImpl,
and adds a static_assert to CallableImpl to enforce that it's only
instantiated with decayed types.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list