Skip to content

Commit 3631b90

Browse files
committed
[lldb] Remove some unused functions from PosixApi.h
There are better llvm replacements for all of these.
1 parent 614363e commit 3631b90

File tree

2 files changed

+0
-34
lines changed

2 files changed

+0
-34
lines changed

lldb/include/lldb/Host/windows/PosixApi.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,6 @@ typedef uint32_t pid_t;
8484
#define STDOUT_FILENO 1
8585
#define STDERR_FILENO 2
8686

87-
#define S_IFDIR _S_IFDIR
88-
89-
#ifndef S_ISDIR
90-
#define S_ISDIR(mode) (((mode)&S_IFMT) == S_IFDIR)
91-
#endif
92-
9387
#endif // _MSC_VER
9488

9589
// Various useful posix functions that are not present in Windows. We provide
@@ -99,9 +93,6 @@ char *strcasestr(const char *s, const char *find);
9993

10094
#ifdef _MSC_VER
10195

102-
char *basename(char *path);
103-
char *dirname(char *path);
104-
10596
int strcasecmp(const char *s1, const char *s2);
10697
int strncasecmp(const char *s1, const char *s2, size_t n);
10798

@@ -110,10 +101,6 @@ int strncasecmp(const char *s1, const char *s2, size_t n);
110101
// empty functions
111102
inline int posix_openpt(int flag) { LLVM_BUILTIN_UNREACHABLE; }
112103

113-
inline int strerror_r(int errnum, char *buf, size_t buflen) {
114-
LLVM_BUILTIN_UNREACHABLE;
115-
}
116-
117104
inline int unlockpt(int fd) { LLVM_BUILTIN_UNREACHABLE; }
118105
inline int grantpt(int fd) { LLVM_BUILTIN_UNREACHABLE; }
119106
inline char *ptsname(int fd) { LLVM_BUILTIN_UNREACHABLE; }

lldb/source/Host/windows/Windows.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -64,27 +64,6 @@ char *strcasestr(const char *s, const char *find) {
6464

6565
#ifdef _MSC_VER
6666

67-
char *basename(char *path) {
68-
char *l1 = strrchr(path, '\\');
69-
char *l2 = strrchr(path, '/');
70-
if (l2 > l1)
71-
l1 = l2;
72-
if (!l1)
73-
return path; // no base name
74-
return &l1[1];
75-
}
76-
77-
char *dirname(char *path) {
78-
char *l1 = strrchr(path, '\\');
79-
char *l2 = strrchr(path, '/');
80-
if (l2 > l1)
81-
l1 = l2;
82-
if (!l1)
83-
return NULL; // no dir name
84-
*l1 = 0;
85-
return path;
86-
}
87-
8867
int strcasecmp(const char *s1, const char *s2) { return stricmp(s1, s2); }
8968

9069
int strncasecmp(const char *s1, const char *s2, size_t n) {

0 commit comments

Comments
 (0)