aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFrancois Pichet <pichet2000@gmail.com>2011-03-29 00:30:01 +0000
committerFrancois Pichet <pichet2000@gmail.com>2011-03-29 00:30:01 +0000
commit79abc9dd4a306d4ec42d09e2673a94abd225bcdc (patch)
treed51a1aac82c7cc28e852083204a880cb6e9dd22a /lib
parenta89cfd23c45708e87bfd3bb1d345a058a4d93a9b (diff)
downloadexternal_llvm-79abc9dd4a306d4ec42d09e2673a94abd225bcdc.zip
external_llvm-79abc9dd4a306d4ec42d09e2673a94abd225bcdc.tar.gz
external_llvm-79abc9dd4a306d4ec42d09e2673a94abd225bcdc.tar.bz2
Fix the MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128441 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/MC/MCDisassembler/Disassembler.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/MC/MCDisassembler/Disassembler.cpp b/lib/MC/MCDisassembler/Disassembler.cpp
index 4d65c22..4707198 100644
--- a/lib/MC/MCDisassembler/Disassembler.cpp
+++ b/lib/MC/MCDisassembler/Disassembler.cpp
@@ -160,7 +160,11 @@ size_t LLVMDisasmInstruction(LLVMDisasmContextRef DCR, uint8_t *Bytes,
std::string p;
p = OS.str();
+#ifdef LLVM_ON_WIN32
+ sprintf(OutString, "%s", p.c_str());
+#else
snprintf(OutString, OutStringSize, "%s", p.c_str());
+#endif
return Size;
}