[PATCH] D126396: Clean "./" from __FILE__ expansion.

Alan Zhao via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 2 15:00:34 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG4ad17d2e96a3: Clean "./" from __FILE__ expansion. (authored by ppluzhnikov, committed by ayzhao).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126396

Files:
  clang/lib/Lex/PPMacroExpansion.cpp


Index: clang/lib/Lex/PPMacroExpansion.cpp
===================================================================
--- clang/lib/Lex/PPMacroExpansion.cpp
+++ clang/lib/Lex/PPMacroExpansion.cpp
@@ -1895,9 +1895,9 @@
   LangOpts.remapPathPrefix(Path);
   if (LangOpts.UseTargetPathSeparator) {
     if (TI.getTriple().isOSWindows())
-      llvm::sys::path::make_preferred(
-          Path, llvm::sys::path::Style::windows_backslash);
+      llvm::sys::path::remove_dots(Path, false,
+                                   llvm::sys::path::Style::windows_backslash);
     else
-      llvm::sys::path::make_preferred(Path, llvm::sys::path::Style::posix);
+      llvm::sys::path::remove_dots(Path, false, llvm::sys::path::Style::posix);
   }
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126396.433899.patch
Type: text/x-patch
Size: 732 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220602/5d2a64b0/attachment.bin>


More information about the cfe-commits mailing list