aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJukka Jylänki <jujjyl@gmail.com>2014-01-24 16:13:50 +0200
committerJukka Jylänki <jujjyl@gmail.com>2014-01-24 16:13:50 +0200
commit3fee0b7cf0f87fe5e51eb06852e4bd78e4bd692d (patch)
tree540acfe307f92f1f325a5115b595404b755f3e6a
parent922cd303096dcee330dc72b77a0d5af02b43a75d (diff)
Fix snprintf symbol name on Visual Studio.
-rw-r--r--lib/Target/JSBackend/JSBackend.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/JSBackend/JSBackend.cpp b/lib/Target/JSBackend/JSBackend.cpp
index c443c3bf9e..51f7488f97 100644
--- a/lib/Target/JSBackend/JSBackend.cpp
+++ b/lib/Target/JSBackend/JSBackend.cpp
@@ -44,6 +44,10 @@ using namespace llvm;
#include <OptPasses.h>
#include <Relooper.h>
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
#define dump(x) fprintf(stderr, x "\n")
#define dumpv(x, ...) fprintf(stderr, x "\n", __VA_ARGS__)
#define dumpfail(x) { fprintf(stderr, x "\n"); fprintf(stderr, "%s : %d\n", __FILE__, __LINE__); report_fatal_error("fail"); }