[PATCH] D21643: Default to using the Unicode version of Win32 APIs

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 23 08:25:20 PDT 2016

aaron.ballman added a comment.

In http://reviews.llvm.org/D21643#465579, @rnk wrote:

> Sure, this serves as a reminder that you should always convert from UTF-8 to wide in Windows support code. I still think we should always explicitly call the wide variants, and it seems like you agree. Defining these macros is just a way to ensure we don't accidentally regress.

Exactly!  This patch was motivated by a recent bug I found where we used an unprefixed function that defaulted to ANSI instead of Wide.

> Can you build asan with this change? I suspect it will be sensitive to it because it wraps the win32 API directly rather than going through Support.

I have never successfully built compiler-rt with MSVC. Every time I've tried (the last time was 6+ months ago, so I will try again), the MSVC solution generated by CMake refuses to compile. From what I understand, it basically only works with ninja, which I do not have installed. :-(

If you wouldn't mind giving it a shot, I would be curious to know what the state of it is with this change.


More information about the cfe-commits mailing list