[PATCH] D30675: [clangd] Fix not being able to attach a debugger on macOS

2017-03-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL297779: [clangd] Fix not being able to attach a debugger on 
macOS (authored by d0k).

Changed prior to commit:
  https://reviews.llvm.org/D30675?vs=91246&id=91768#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D30675

Files:
  clang-tools-extra/trunk/clangd/ClangDMain.cpp


Index: clang-tools-extra/trunk/clangd/ClangDMain.cpp
===
--- clang-tools-extra/trunk/clangd/ClangDMain.cpp
+++ clang-tools-extra/trunk/clangd/ClangDMain.cpp
@@ -67,6 +67,10 @@
 // by \r\n.
 std::string Line;
 std::getline(std::cin, Line);
+if (!std::cin.good() && errno == EINTR) {
+  std::cin.clear();
+  continue;
+}
 
 // Skip empty lines.
 llvm::StringRef LineRef(Line);


Index: clang-tools-extra/trunk/clangd/ClangDMain.cpp
===
--- clang-tools-extra/trunk/clangd/ClangDMain.cpp
+++ clang-tools-extra/trunk/clangd/ClangDMain.cpp
@@ -67,6 +67,10 @@
 // by \r\n.
 std::string Line;
 std::getline(std::cin, Line);
+if (!std::cin.good() && errno == EINTR) {
+  std::cin.clear();
+  continue;
+}
 
 // Skip empty lines.
 llvm::StringRef LineRef(Line);
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D30675: [clangd] Fix not being able to attach a debugger on macOS

2017-03-14 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson added a comment.

In https://reviews.llvm.org/D30675#700917, @bkramer wrote:

> lg, do you have commit access?


No I do not have commit access. Could you commit it? Thank you very much!


https://reviews.llvm.org/D30675



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D30675: [clangd] Fix not being able to attach a debugger on macOS

2017-03-14 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer accepted this revision.
bkramer added a comment.
This revision is now accepted and ready to land.

lg, do you have commit access?


https://reviews.llvm.org/D30675



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D30675: [clangd] Fix not being able to attach a debugger on macOS

2017-03-14 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson added a comment.

Ping :)


https://reviews.llvm.org/D30675



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D30675: [clangd] Fix not being able to attach a debugger on macOS

2017-03-09 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson updated this revision to Diff 91246.
malaperle-ericsson added a comment.

Remove ifdexf


https://reviews.llvm.org/D30675

Files:
  clangd/ClangDMain.cpp


Index: clangd/ClangDMain.cpp
===
--- clangd/ClangDMain.cpp
+++ clangd/ClangDMain.cpp
@@ -67,6 +67,10 @@
 // by \r\n.
 std::string Line;
 std::getline(std::cin, Line);
+if (!std::cin.good() && errno == EINTR) {
+  std::cin.clear();
+  continue;
+}
 
 // Skip empty lines.
 llvm::StringRef LineRef(Line);


Index: clangd/ClangDMain.cpp
===
--- clangd/ClangDMain.cpp
+++ clangd/ClangDMain.cpp
@@ -67,6 +67,10 @@
 // by \r\n.
 std::string Line;
 std::getline(std::cin, Line);
+if (!std::cin.good() && errno == EINTR) {
+  std::cin.clear();
+  continue;
+}
 
 // Skip empty lines.
 llvm::StringRef LineRef(Line);
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D30675: [clangd] Fix not being able to attach a debugger on macOS

2017-03-08 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson added a comment.

In https://reviews.llvm.org/D30675#695370, @bkramer wrote:

> Generally makes sense. Is there any reason for the #ifdef? Windows has errno 
> and EINTR too.


I have no reasonable expectation that getline will produce a EINTR on Windows. 
But perhaps there's no harm in doing so? What is you preference?


Repository:
  rL LLVM

https://reviews.llvm.org/D30675



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D30675: [clangd] Fix not being able to attach a debugger on macOS

2017-03-08 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer added a comment.

Generally makes sense. Is there any reason for the #ifdef? Windows has errno 
and EINTR too.


Repository:
  rL LLVM

https://reviews.llvm.org/D30675



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits