aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorJohannes Doerfert <johannes@jdoerfert.de>2023-12-04 17:10:37 -0800
committerGitHub <noreply@github.com>2023-12-04 17:10:37 -0800
commit66784dcb3b4302cea606c3e74913350197b7ed45 (patch)
tree4e8e91a8e64609b81184ebbe5339fbfde7bd89e3 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentd6f4d5209ffcdc6d8e33a14fe8df70283b768f45 (diff)
downloadllvm-66784dcb3b4302cea606c3e74913350197b7ed45.zip
llvm-66784dcb3b4302cea606c3e74913350197b7ed45.tar.gz
llvm-66784dcb3b4302cea606c3e74913350197b7ed45.tar.bz2
[OpenMP] Ensure `Devices` is accessed exlusively (#74374)
We accessed the `Devices` container most of the time while holding the RTLsMtx, but not always. Sometimes we used the mutex for the size query, but then accessed Devices again unguarded. From now we properly encapsulate the container in a ProtectedObj which ensures exclusive accesses. We also hide the "isReady" part in the `getDevice` accessor and use an `llvm::Expected` to allow to return errors.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions