summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Support/Format.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/Support/Format.h b/include/llvm/Support/Format.h
index 164ad6a353..f64e3db7d6 100644
--- a/include/llvm/Support/Format.h
+++ b/include/llvm/Support/Format.h
@@ -25,6 +25,14 @@
#include <cassert>
#include <cstdio>
+#ifdef _MSC_VER
+// FIXME: This define is wrong:
+// - _snprintf does not guarantee that trailing null is always added - if
+// there is no space for null, it does not report any error.
+// - According to C++ standard, snprintf should be visible in the 'std'
+// namespace - this define makes this impossible.
+#define snprintf _snprintf
+#endif
namespace llvm {