[Lldb-commits] [PATCH] D46687: Remove custom path manipulation functions from FileSpec

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu May 10 10:05:17 PDT 2018


labath added inline comments.


================
Comment at: source/Utility/FileSpec.cpp:277-281
+  auto style = LLVMPathSyntax(syntax);
+  m_filename.SetString(llvm::sys::path::filename(resolved, style));
+  llvm::StringRef dir = llvm::sys::path::parent_path(resolved, style);
+  if (!dir.empty())
+    m_directory.SetString(dir);
----------------
clayborg wrote:
> Does this work ok in LLVM if the slashes have already been switched on line 275? We would specify a syntax of windows, but the slashes would be wrong?
That's not a problem. in the windows path style, the llvm functions treat both kinds of slashes as directory separators.


https://reviews.llvm.org/D46687





More information about the lldb-commits mailing list