[Lldb-commits] [PATCH] D24960: Remove unreachable from apis in posix terminal compat windows and return 0

Carlo Kok via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 27 05:31:36 PDT 2016


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 {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24960.72633.patch
Type: text/x-patch
Size: 1172 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160927/a669357c/attachment.bin>


More information about the lldb-commits mailing list