mesa/src/compiler/clc
Jason Ekstrand 46d9b0e431 clc: Declare LLVMContexts on the stack
This prevents more use-after-free errors.  Passing them around using
std::unique_ptr ensures that the LLVMContext gets destroyed but doesn't
ensure destruction order.  Declaring it on the stack ensures that the
context doesn't get destroyed until right before the the function
returns which is after any other LLVM stuff is destroyed.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Icecream95 <ixn@disroot.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15937>
2022-04-14 21:19:56 +00:00
..
clc.c
clc.h clc: let user specify the targetted SPIRV version 2021-10-03 19:32:54 +00:00
clc_helpers.cpp clc: Declare LLVMContexts on the stack 2022-04-14 21:19:56 +00:00
clc_helpers.h clc: add simple llvm initialise API 2022-04-14 21:19:56 +00:00
meson.build clc: let user specify the targetted SPIRV version 2021-10-03 19:32:54 +00:00