[PATCH] D12604: Support: Add utility functions to get MSVC/WinSDK installation paths.

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 3 13:02:25 PDT 2015


rnk added a comment.

Can you move the win32 specific stuff into lib/Support/Windows/MSVC.inc? The Unix stub side can stay in MSVC.cpp, it's small enough it doesn't need to be pulled out.

See this comment in llvm/lib/Support/Windows/WindowsSupport.h:

  // This file defines things specific to Windows implementations.  In addition to
  // providing some helpers for working with win32 APIs, this header wraps
  // <windows.h> with some portability macros.  Always include WindowsSupport.h
  // instead of including <windows.h> directly.


================
Comment at: lib/Support/MSVC.cpp:28-30
@@ +27,5 @@
+  // doing so requires UTF8 / UTF16 conversions similar to how we handle command
+  // line arguments.  The UTF8 conversion functions are not exposed publicly
+  // from LLVM though, so in order to do this we will probably need to create
+  // a registry abstraction in LLVMSupport that is Windows only.
+  DWORD Result = 0;
----------------
majnemer wrote:
> Can this be fixed now that we are sinking the code into LLVM?
I'd fix it separately and keep this as a simple code motion. getSystemRegistryString needs to be rewritten anyway.


Repository:
  rL LLVM

http://reviews.llvm.org/D12604





More information about the llvm-commits mailing list