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

Dan McGregor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 22 14:22:30 PDT 2022


dankm updated this revision to Diff 454609.
dankm added a comment.
Herald added a subscriber: emaste.

Updated debug-prefix-map.s test cases to detect this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132390

Files:
  llvm/include/llvm/MC/MCContext.h
  llvm/test/MC/ELF/debug-prefix-map.s


Index: llvm/test/MC/ELF/debug-prefix-map.s
===================================================================
--- llvm/test/MC/ELF/debug-prefix-map.s
+++ llvm/test/MC/ELF/debug-prefix-map.s
@@ -11,9 +11,9 @@
 # RUN: llvm-mc -triple=x86_64 -g -dwarf-version=5 src.s -filetype=obj -o map.5.o -fdebug-prefix-map=%t.foo=src_root
 # RUN: llvm-dwarfdump -v -debug-info -debug-line map.5.o | FileCheck --check-prefix=MAP_V5 %s
 
-# RUN: llvm-mc -triple=x86_64 -g -dwarf-version=4 %t.foo/src.s -filetype=obj -o mapabs.4.o -fdebug-prefix-map=%t.foo=/src_root
+# RUN: llvm-mc -triple=x86_64 -g -dwarf-version=4 %t.foo/src.s -filetype=obj -o mapabs.4.o -fdebug-prefix-map=%t=/broken_root -fdebug-prefix-map=%t.foo=/src_root
 # RUN: llvm-dwarfdump -v -debug-info -debug-line mapabs.4.o | FileCheck --check-prefix=MAPABS_V4 %s
-# RUN: llvm-mc -triple=x86_64 -g -dwarf-version=5 %t.foo/src.s -filetype=obj -o mapabs.5.o -fdebug-prefix-map=%t.foo=/src_root
+# RUN: llvm-mc -triple=x86_64 -g -dwarf-version=5 %t.foo/src.s -filetype=obj -o mapabs.5.o -fdebug-prefix-map=%t=/broken_root -fdebug-prefix-map=%t.foo=/src_root
 # RUN: llvm-dwarfdump -v -debug-info -debug-line mapabs.5.o | FileCheck --check-prefix=MAPABS_V5 %s
 
 f:
Index: llvm/include/llvm/MC/MCContext.h
===================================================================
--- llvm/include/llvm/MC/MCContext.h
+++ llvm/include/llvm/MC/MCContext.h
@@ -190,7 +190,8 @@
   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.454609.patch
Type: text/x-patch
Size: 1760 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220822/e418c05c/attachment.bin>


More information about the llvm-commits mailing list