[PATCH] D132390: [MCContext] reverse order of DebugPrefixMap sort

Dan McGregor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 22 09:25:18 PDT 2022


dankm created this revision.
Herald added a project: All.
dankm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Match Clang's sorting, so that longer (more specific) prefix paths
will match before less specific paths.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D132390

Files:
  llvm/include/llvm/MC/MCContext.h


Index: llvm/include/llvm/MC/MCContext.h
===================================================================
--- llvm/include/llvm/MC/MCContext.h
+++ llvm/include/llvm/MC/MCContext.h
@@ -190,7 +190,7 @@
   SmallString<128> CompilationDir;
 
   /// Prefix replacement map for source file information.
-  std::map<const std::string, const std::string> DebugPrefixMap;
+  std::map<const std::string, const std::string, std::greater<std::string>> DebugPrefixMap;
 
   /// The main file name if passed in explicitly.
   std::string MainFileName;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132390.454541.patch
Type: text/x-patch
Size: 540 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220822/9acc0090/attachment.bin>


More information about the llvm-commits mailing list