summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-12-22 20:11:00 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-12-22 20:11:00 +0000
commit3b8235bec3bfa68a30e1669ec119104b12743e1a (patch)
tree8bc216192c64a68f8d43614c8219e9892c975180 /llvm/include
parentc0f6402a9415b091555c9b84a5ad62de085e4266 (diff)
downloadbcm5719-llvm-3b8235bec3bfa68a30e1669ec119104b12743e1a.tar.gz
bcm5719-llvm-3b8235bec3bfa68a30e1669ec119104b12743e1a.zip
Restore snprintf weirdness for VCPP only
llvm-svn: 91918
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Support/Format.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/Format.h b/llvm/include/llvm/Support/Format.h
index 164ad6a3533..f64e3db7d65 100644
--- a/llvm/include/llvm/Support/Format.h
+++ b/llvm/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 {
OpenPOWER on IntegriCloud