diff options
author | Martin Storsjo <martin@martin.st> | 2019-09-23 12:03:33 +0000 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2019-09-23 12:03:33 +0000 |
commit | 02d3cc97fa443d09febc49a8694bd138a5582863 (patch) | |
tree | fd61dd5ddc9a58eb5079790ac84cd61257d1a2a9 /lldb/source/Host/windows | |
parent | d67b0997d2c472a28996c37918c3119efc7e11af (diff) | |
download | bcm5719-llvm-02d3cc97fa443d09febc49a8694bd138a5582863.tar.gz bcm5719-llvm-02d3cc97fa443d09febc49a8694bd138a5582863.zip |
[LLDB] Remove a now redundant windows specific workaround
vsnprintf(NULL, 0, ...) works for measuring the needed string
size on all supported Windows variants; it's supported since
at least MSVC 2015 (and LLVM requires a newer version than that),
and works on both msvcrt.dll (since at least XP) and UCRT with MinGW.
The previous use of ifdefs was wrong as well, as __MINGW64__ only is
defined for 64 bit targets, and the define without trailing
underscores is never defined automatically (neither by clang nor
by gcc).
Differential Revision: https://reviews.llvm.org/D67861
llvm-svn: 372591
Diffstat (limited to 'lldb/source/Host/windows')
-rw-r--r-- | lldb/source/Host/windows/Windows.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/lldb/source/Host/windows/Windows.cpp b/lldb/source/Host/windows/Windows.cpp index e76f6d2dba6..fa664f53984 100644 --- a/lldb/source/Host/windows/Windows.cpp +++ b/lldb/source/Host/windows/Windows.cpp @@ -48,13 +48,8 @@ int vasprintf(char **ret, const char *fmt, va_list ap) { size_t buflen; va_list ap2; -#if defined(_MSC_VER) || defined(__MINGW64) - ap2 = ap; - len = _vscprintf(fmt, ap2); -#else va_copy(ap2, ap); len = vsnprintf(NULL, 0, fmt, ap2); -#endif if (len >= 0 && (buf = (char *)malloc((buflen = (size_t)(len + 1)))) != NULL) { |