HomePhabricator

[MinGW] Mark a number of library functions unavailable for mingw targets

Authored by mstorsjo on May 20 2021, 2:47 PM.

Description

[MinGW] Mark a number of library functions unavailable for mingw targets

These functions were marked unavailable for MSVC targets before,
within an "T.isOSWindows() && !T.isOSCygMing()" block, but these ones
are unavailable on MinGW targets too.

This avoids generating calls to stpcpy for MinGW targets, which has
been happening since 6dbf0cfcf789365493f70ae69df8a7a59be41c75 (in
some cases).

This fixes https://github.com/mstorsjo/llvm-mingw/issues/201.

Differential Revision: https://reviews.llvm.org/D102946

Details

Committed
mstorsjoMay 22 2021, 1:40 PM
Differential Revision
D102946: [MinGW] Mark a number of library functions unavailable for mingw targets
Parents
rGb604301be355: [Driver] Support libc++ in MSVC
Branches
Unknown
Tags
Unknown

Event Timeline

Herald added a subscriber: Restricted Project. ยท View Herald TranscriptMay 22 2021, 1:40 PM
xbolva00 added inline comments.
/llvm/lib/Analysis/TargetLibraryInfo.cpp
363

memccpy was added in C2x, together with str(n)dup so mingw should add it as well.

mstorsjo added inline comments.May 22 2021, 3:46 PM
/llvm/lib/Analysis/TargetLibraryInfo.cpp
363

Mingw does have those functions - the diff is kinda hard to read; this block is for the functions that are kept where they were originally in the MSVC-specific block, while some functions are moved to a separate block below - but the diff viewer displays it in reverse.