Author: Pavel Labath Date: 2022-03-28T15:14:19+02:00 New Revision: 3631b9014d4f9289219a0091ea4ebd635d7a517f
URL: https://github.com/llvm/llvm-project/commit/3631b9014d4f9289219a0091ea4ebd635d7a517f DIFF: https://github.com/llvm/llvm-project/commit/3631b9014d4f9289219a0091ea4ebd635d7a517f.diff LOG: [lldb] Remove some unused functions from PosixApi.h There are better llvm replacements for all of these. Added: Modified: lldb/include/lldb/Host/windows/PosixApi.h lldb/source/Host/windows/Windows.cpp Removed: ################################################################################ diff --git a/lldb/include/lldb/Host/windows/PosixApi.h b/lldb/include/lldb/Host/windows/PosixApi.h index 87908209d7167..563af50fd229e 100644 --- a/lldb/include/lldb/Host/windows/PosixApi.h +++ b/lldb/include/lldb/Host/windows/PosixApi.h @@ -84,12 +84,6 @@ typedef uint32_t pid_t; #define STDOUT_FILENO 1 #define STDERR_FILENO 2 -#define S_IFDIR _S_IFDIR - -#ifndef S_ISDIR -#define S_ISDIR(mode) (((mode)&S_IFMT) == S_IFDIR) -#endif - #endif // _MSC_VER // Various useful posix functions that are not present in Windows. We provide @@ -99,9 +93,6 @@ char *strcasestr(const char *s, const char *find); #ifdef _MSC_VER -char *basename(char *path); -char *dirname(char *path); - int strcasecmp(const char *s1, const char *s2); int strncasecmp(const char *s1, const char *s2, size_t n); @@ -110,10 +101,6 @@ int strncasecmp(const char *s1, const char *s2, size_t n); // empty functions inline int posix_openpt(int flag) { LLVM_BUILTIN_UNREACHABLE; } -inline int strerror_r(int errnum, char *buf, size_t buflen) { - LLVM_BUILTIN_UNREACHABLE; -} - inline int unlockpt(int fd) { LLVM_BUILTIN_UNREACHABLE; } inline int grantpt(int fd) { LLVM_BUILTIN_UNREACHABLE; } inline char *ptsname(int fd) { LLVM_BUILTIN_UNREACHABLE; } diff --git a/lldb/source/Host/windows/Windows.cpp b/lldb/source/Host/windows/Windows.cpp index 787f35930baf7..d2561a6c5b6df 100644 --- a/lldb/source/Host/windows/Windows.cpp +++ b/lldb/source/Host/windows/Windows.cpp @@ -64,27 +64,6 @@ char *strcasestr(const char *s, const char *find) { #ifdef _MSC_VER -char *basename(char *path) { - char *l1 = strrchr(path, '\\'); - char *l2 = strrchr(path, '/'); - if (l2 > l1) - l1 = l2; - if (!l1) - return path; // no base name - return &l1[1]; -} - -char *dirname(char *path) { - char *l1 = strrchr(path, '\\'); - char *l2 = strrchr(path, '/'); - if (l2 > l1) - l1 = l2; - if (!l1) - return NULL; // no dir name - *l1 = 0; - return path; -} - int strcasecmp(const char *s1, const char *s2) { return stricmp(s1, s2); } int strncasecmp(const char *s1, const char *s2, size_t n) { _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits