Added posix function gettimeofday to LibFunc::Func for all platforms but Windows.

*NOTE* In a recent version of posix, they added the restrict keyword to the
arguments for this function. From some spelunking it seems that on some
platforms, the call has restrict on its arguments and others it does not. Thus I
left off the restrict keyword from the function prototype in the comment.

llvm-svn: 185501
This commit is contained in:
Michael Gottesman 2013-07-03 04:00:51 +00:00
parent f94eb2bb26
commit f7459c740b
2 changed files with 4 additions and 0 deletions

View File

@ -308,6 +308,8 @@ namespace llvm {
getpwnam,
/// char *gets(char *s);
gets,
/// int gettimeofday(struct timeval *tp, void *tzp);
gettimeofday,
/// uint32_t htonl(uint32_t hostlong);
htonl,
/// uint16_t htons(uint16_t hostshort);

View File

@ -168,6 +168,7 @@ const char* TargetLibraryInfo::StandardNames[LibFunc::NumLibFuncs] =
"getlogin_r",
"getpwnam",
"gets",
"gettimeofday",
"htonl",
"htons",
"iprintf",
@ -490,6 +491,7 @@ static void initialize(TargetLibraryInfo &TLI, const Triple &T,
TLI.setUnavailable(LibFunc::getitimer);
TLI.setUnavailable(LibFunc::getlogin_r);
TLI.setUnavailable(LibFunc::getpwnam);
TLI.setUnavailable(LibFunc::gettimeofday);
TLI.setUnavailable(LibFunc::htonl);
TLI.setUnavailable(LibFunc::htons);
TLI.setUnavailable(LibFunc::lchown);