diff options
author | Alp Toker <alp@nuanti.com> | 2014-06-26 00:25:41 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2014-06-26 00:25:41 +0000 |
commit | 2251672878c7212c96f16c6f2d30c142f2aae877 (patch) | |
tree | 9509bbc4c6ff7ad89d5232a7ef1491d1c46a8eb1 /llvm/lib/IRReader | |
parent | 0f0cd46201c90c06d3f5e7c93c80cce0565881bc (diff) | |
download | llvm-2251672878c7212c96f16c6f2d30c142f2aae877.zip llvm-2251672878c7212c96f16c6f2d30c142f2aae877.tar.gz llvm-2251672878c7212c96f16c6f2d30c142f2aae877.tar.bz2 |
MSVC build fix following r211749
Avoid strndup()
llvm-svn: 211752
Diffstat (limited to 'llvm/lib/IRReader')
-rw-r--r-- | llvm/lib/IRReader/IRReader.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/IRReader/IRReader.cpp b/llvm/lib/IRReader/IRReader.cpp index 6d389d4d..e729907 100644 --- a/llvm/lib/IRReader/IRReader.cpp +++ b/llvm/lib/IRReader/IRReader.cpp @@ -110,7 +110,8 @@ LLVMBool LLVMParseIRInContext(LLVMContextRef ContextRef, if (OutMessage) { string_ostream os; Diag.print(nullptr, os, false); - *OutMessage = strndup(os.str().data(), os.str().size()); + os << '\0'; + *OutMessage = strdup(os.str().data()); } return 1; } |