diff options
author | Haojian Wu <hokein.wu@gmail.com> | 2024-11-08 16:01:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-08 16:01:19 +0100 |
commit | 9aea6671085f02e6127750103ca48ae6a09ceeb8 (patch) | |
tree | 19e8516ed5eb70f200c2d369b0e18262fdd84f4b /llvm/unittests/TargetParser/TargetParserTest.cpp | |
parent | 1645d99bc9c16b1f9e2f08e36d67054498d8751e (diff) | |
download | llvm-9aea6671085f02e6127750103ca48ae6a09ceeb8.zip llvm-9aea6671085f02e6127750103ca48ae6a09ceeb8.tar.gz llvm-9aea6671085f02e6127750103ca48ae6a09ceeb8.tar.bz2 |
[symbolizer] Change the ErrorHandler from llvm::function_ref to std::function. (#115477)
This fixes dangling `ErrorHandler` references
([here](https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cpp#L48-L53)
is an example).
`llvm::function_ref` doesn't own the callable, and it is not safe to
store a function_ref (the `PlainPrinterBase` stores a
`llvm::function_ref` which can easily lead to dangling references).
Diffstat (limited to 'llvm/unittests/TargetParser/TargetParserTest.cpp')
0 files changed, 0 insertions, 0 deletions