[all-commits] [llvm/llvm-project] e02701: [PatternMatch] Fix issue of stale reference in new...
goldsteinn via All-commits
all-commits at lists.llvm.org
Mon Jul 15 02:28:36 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e027017337cc8ae6ed03dc2a3d1c9903ea2f33b2
https://github.com/llvm/llvm-project/commit/e027017337cc8ae6ed03dc2a3d1c9903ea2f33b2
Author: goldsteinn <35538541+goldsteinn at users.noreply.github.com>
Date: 2024-07-15 (Mon, 15 Jul 2024)
Changed paths:
M llvm/include/llvm/IR/PatternMatch.h
M llvm/unittests/IR/PatternMatch.cpp
Log Message:
-----------
[PatternMatch] Fix issue of stale reference in new `m_{I,F,}Cmp` matchers (#98866)
The new matchers don't output pred. Previously we where just creating
a value on the stack and using it as a dummy output for the matchers,
but this results in a stale reference upon return.
To fix, this patch changes the output variable to a pointer, and
passes in `nullptr` for the matchers that don't output `pred.`
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