[Lldb-commits] [PATCH] D18689: Make FileSpec handling platform-independent

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 1 15:02:46 PDT 2016


zturner added a comment.

Ugh.  The only better way I can think of to do this would be to go into LLVM and rip out all the preprocessor defines, and compile `_windows` and `_posix` versions of every function unconditionally, and then only use the preprocessor defines to do something like:

  #if defined(LLVM_ON_WIN32)
      #define parent_path parent_path_windows
  #else
      #define parent_path parent_path_posix
  #endif

But...  That's a lot of effort to go through.  So while this code duplication isn't really that desirable, I guess it's ok given the amount of effort of the alternative.


http://reviews.llvm.org/D18689





More information about the lldb-commits mailing list