[PATCH] D54182: [Windows] Sink function bodies to .cpp file

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 6 14:15:55 PST 2018


aganea added inline comments.


================
Comment at: llvm/lib/Support/Windows/Process.inc:469
+bool llvm::RunningWindows8OrGreater() {
+  // Windows 8 is version 6.2, service pack 0.
+  OSVERSIONINFOEXW osvi = {};
----------------
Can't you just replace the contents of this function by:
```
return GetWindowsOSVersion() >= llvm::VersionTuple(6, 2, 0, 0);
```


================
Comment at: llvm/lib/Support/Windows/Process.inc:503
+
+  OSVERSIONINFOEX info;
+  ZeroMemory(&info, sizeof(OSVERSIONINFOEX));
----------------
I'm wondering after all if we shouldn't just drop the part below? It's deprecated anyway, and the call to `RtlGetVersion` would probably always succeed (if you can't aquire a handle to `ntdll.dll` most likely you won't be able to run anything on your machine). What do you think?


https://reviews.llvm.org/D54182





More information about the llvm-commits mailing list