carlokok created this revision.
carlokok added a subscriber: LLDB.
carlokok set the repository for this revision to rL LLVM.
carlokok added a project: LLDB.

These apis are called by lldb process launching but the unreachable causes them 
to fail on Windows. However, they don't have to do anything because Windows has 
implied support for terminals.

Repository:
  rL LLVM

https://reviews.llvm.org/D24960

Files:
  /lldb/trunk/include/lldb/Host/windows/PosixApi.h

Index: /lldb/trunk/include/lldb/Host/windows/PosixApi.h
===================================================================
--- /lldb/trunk/include/lldb/Host/windows/PosixApi.h
+++ /lldb/trunk/include/lldb/Host/windows/PosixApi.h
@@ -98,19 +98,19 @@
 int strncasecmp(const char *s1, const char *s2, size_t n);
 
 // empty functions
-inline int posix_openpt(int flag) { LLVM_BUILTIN_UNREACHABLE; }
+inline int posix_openpt(int flag) { return 0; }
 
 inline int strerror_r(int errnum, char *buf, size_t buflen) {
-  LLVM_BUILTIN_UNREACHABLE;
+  return 0;
 }
 
-inline int unlockpt(int fd) { LLVM_BUILTIN_UNREACHABLE; }
-inline int grantpt(int fd) { LLVM_BUILTIN_UNREACHABLE; }
-inline char *ptsname(int fd) { LLVM_BUILTIN_UNREACHABLE; }
 
-inline pid_t fork(void) { LLVM_BUILTIN_UNREACHABLE; }
-inline pid_t setsid(void) { LLVM_BUILTIN_UNREACHABLE; }
+inline int unlockpt(int fd) { return 0; }
+inline int grantpt(int fd) { return 0; }
+inline char *ptsname(int fd) { return 0; }
 
+inline pid_t fork(void) { return 0; }
+inline pid_t setsid(void) { return 0; }
 // vsnprintf and snprintf are provided in MSVC 2015 and higher.
 #if _MSC_VER < 1900
 namespace lldb_private {


Index: /lldb/trunk/include/lldb/Host/windows/PosixApi.h
===================================================================
--- /lldb/trunk/include/lldb/Host/windows/PosixApi.h
+++ /lldb/trunk/include/lldb/Host/windows/PosixApi.h
@@ -98,19 +98,19 @@
 int strncasecmp(const char *s1, const char *s2, size_t n);
 
 // empty functions
-inline int posix_openpt(int flag) { LLVM_BUILTIN_UNREACHABLE; }
+inline int posix_openpt(int flag) { return 0; }
 
 inline int strerror_r(int errnum, char *buf, size_t buflen) {
-  LLVM_BUILTIN_UNREACHABLE;
+  return 0;
 }
 
-inline int unlockpt(int fd) { LLVM_BUILTIN_UNREACHABLE; }
-inline int grantpt(int fd) { LLVM_BUILTIN_UNREACHABLE; }
-inline char *ptsname(int fd) { LLVM_BUILTIN_UNREACHABLE; }
 
-inline pid_t fork(void) { LLVM_BUILTIN_UNREACHABLE; }
-inline pid_t setsid(void) { LLVM_BUILTIN_UNREACHABLE; }
+inline int unlockpt(int fd) { return 0; }
+inline int grantpt(int fd) { return 0; }
+inline char *ptsname(int fd) { return 0; }
 
+inline pid_t fork(void) { return 0; }
+inline pid_t setsid(void) { return 0; }
 // vsnprintf and snprintf are provided in MSVC 2015 and higher.
 #if _MSC_VER < 1900
 namespace lldb_private {
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to