[Lldb-commits] [PATCH] D106035: Remove conditional compilation for WCHAR support in libedit

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 15 06:32:39 PDT 2021


teemperor added a comment.

I actually expected after the RFC that we would remove all the non-wchar code, but this seems also fine. I think this LGTM in general, but I feel a bit nervous about touching stuff that depends so much on OS/environment. What OS/environment did you test this patch on? Would be nice to have this tested on a few setups before landing.

Also I'm kinda curious if you found any docs/examples that explain whether mixing the wchar/char functions like we do now is actually supported in libedit? IIUC we call now `el_wset` and `el_set` on the same libedit instance. It feels like the `wchar` support in the FreeBSD port was some kind of parallel implementation to the normal `char` support, so I'm surprised that we can just mix those functions and everything still works fine (at least on my Linux machine this seems to work).



================
Comment at: lldb/source/Host/common/Editline.cpp:554
     if (read_count) {
-      if (CompleteCharacter(ch, *c))
+      if (CompleteCharacter(ch, *c)) {
         return 1;
----------------
The original code was actually LLVM-code style (no {} around single line ifs)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106035/new/

https://reviews.llvm.org/D106035



More information about the lldb-commits mailing list