[Lldb-commits] [PATCH] D101250: Wrap edit line configuration calls into helper functions

Neal via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 26 21:17:29 PDT 2021


nealsid added a comment.

In D101250#2718107 <https://reviews.llvm.org/D101250#2718107>, @JDevlieghere wrote:

> LGTM. I wonder if we would want to wrap this in a macro to get rid of the `EditLineConstString` duplication while keeping the type safety.

Thanks!  I looked into removing the EditLineConstString, but I wasn't a fan of having two preprocessor macro expansions.  Maybe it could be a template function wchar_t or char.  I also tried some template specialization where the functions to call into the edit line library could be instantiated when used, but it didn't really appear to save much because all the method signatures for edit line parameters have to be manually maintained, and some of them still take varargs even after specifying the edit line op parameter., e.g.:

template<int N> void editLineCaller();

template<>
void editLineCaller<EL_ADDFN>(param1Type param1, param2Type param2) {

  el_set(EL_ADFN, param1, param2);

. . .
}


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101250



More information about the lldb-commits mailing list