[PATCH] D23378: Explicitly specify MSVC mangling of iostream globals
Eric Fiselier via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 4 22:44:22 PST 2017
EricWF added a comment.
In https://reviews.llvm.org/D23378#512640, @majnemer wrote:
> I don't think _WIN32 is the right guard because mingw defines that macro and it uses the Itanium mangling.
>
> I'd use something like `_MSC_VER`.
Libc++ now has macros for the object format it's targeting. I think these changes should be guarded with `#if defined(_LIBCPP_OBJECT_FORMAT_COFF)` now.
================
Comment at: src/iostream.cpp:18-19
+_ALIGNAS_TYPE (istream) _LIBCPP_FUNC_VIS char cin[sizeof(istream)]
+#if defined(_MSC_VER)
+__asm__("?cin at __1@std@@3V?$basic_istream at DU?$char_traits at D@__1 at std@@@12 at A")
+#endif
----------------
Please guard these changes with `#if defined(_LIBCPP_OBJECT_FORMAT_COFF)` instead.
https://reviews.llvm.org/D23378
More information about the llvm-commits
mailing list