[PATCH] D14892: Add Windows error code and tidy formatting for system errors

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 20 18:29:38 PST 2015


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm


================
Comment at: lib/Support/Windows/WindowsSupport.h:51
@@ -49,2 +50,3 @@
   char *buffer = NULL;
   DWORD R = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
+                          FORMAT_MESSAGE_FROM_SYSTEM |
----------------
According to MSDN, this call can update the last error code. You might want to cache it locally at the beginning of this function.


http://reviews.llvm.org/D14892





More information about the llvm-commits mailing list