about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorDan Gohman <dev@sunfishcode.online>2022-03-20 15:37:31 -0700
committerDan Gohman <dev@sunfishcode.online>2022-03-20 15:37:31 -0700
commit95e170228440011bc6ac2eb5c689eda2f75ac586 (patch)
treedf7e301abf4f6806f434b3117906cd7bcff2ed9d /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parentc84f39e6c08397d4ab9b51b472002a8bfc3b5b59 (diff)
downloadrust-95e170228440011bc6ac2eb5c689eda2f75ac586.tar.gz
rust-95e170228440011bc6ac2eb5c689eda2f75ac586.zip
Preserve the Windows `GetLastError` error in `HandleOrInvalid`.
In the `TryFrom<HandleOrInvalid> for OwnedHandle` and
`TryFrom<HandleOrNull> for OwnedHandle` implemenations, `forget` the
owned handle on the error path, to avoid calling `CloseHandle` on an
invalid handle. It's harmless, except that it may overwrite the
thread's `GetLastError` error.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions