diff options
author | Jon Chesterfield <jonathanchesterfield@gmail.com> | 2021-09-09 17:28:10 +0100 |
---|---|---|
committer | Jon Chesterfield <jonathanchesterfield@gmail.com> | 2021-09-09 17:28:11 +0100 |
commit | 6760234e8d59ef22b816eef087d82f2e116eab08 (patch) | |
tree | 1c2a3fc3387702473975bc47695d2dcfe7bca639 /llvm/lib/Support/APFloat.cpp | |
parent | 0db402c5b4ef60ca8d20dda8bb59c7288a534e2a (diff) | |
download | llvm-6760234e8d59ef22b816eef087d82f2e116eab08.zip llvm-6760234e8d59ef22b816eef087d82f2e116eab08.tar.gz llvm-6760234e8d59ef22b816eef087d82f2e116eab08.tar.bz2 |
[libomptarget][amdgpu] Precisely manage hsa lifetime
The hsa library must be initialized before any calls into it and
destructed after the last call into it. There have been a number of bugs in
this area related to member variables which would like to use raii to manage
resources acquired from hsa.
This patch moves the init/shutdown of hsa into a class, such that when used as
the first member variable (could be a base), the lifetime of other member
variables are reliably scoped within it. This will allow other classes to use
raii reliably when used as member variables within the global.
Reviewed By: pdhaliwal
Differential Revision: https://reviews.llvm.org/D109512
Diffstat (limited to 'llvm/lib/Support/APFloat.cpp')
0 files changed, 0 insertions, 0 deletions