[PATCH] D138747: [Support] On Windows 11, fix an affinity mask issue on large core count machines
Thorsten via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 26 12:07:28 PST 2022
tschuett added inline comments.
================
Comment at: llvm/lib/Support/Windows/Process.inc:479
-llvm::VersionTuple llvm::GetWindowsOSVersion() {
- HMODULE hMod = ::GetModuleHandleW(L"ntdll.dll");
- if (hMod) {
+static Optional<RTL_OSVERSIONINFOEXW> GetWindowsVer() {
+ auto getVer = []() -> Optional<RTL_OSVERSIONINFOEXW> {
----------------
You can use `std::option<RTL_OSVERSIONINFOEXW>`.
================
Comment at: llvm/lib/Support/Windows/Process.inc:502
+ if (!info)
+ return llvm::VersionTuple(0, 0, 0, 0);
+
----------------
This looks like cute way to model `nullopt`. Would returning `std::option<lvm::VersionTuple>` be an improvement?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138747/new/
https://reviews.llvm.org/D138747
More information about the llvm-commits
mailing list