[PATCH] D132390: [MCContext] Reverse order of DebugPrefixMap sort for generated assembly debug info

Dan McGregor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 31 10:41:03 PDT 2022


dankm marked an inline comment as done.
dankm added a comment.

In D132390#3757188 <https://reviews.llvm.org/D132390#3757188>, @MaskRay wrote:

> I've created https://github.com/llvm/llvm-project/issues/57437 for 15.0.0 backport. If it is too late, we can request 15.0.1 backport.

Thanks!



================
Comment at: llvm/include/llvm/MC/MCContext.h:193
   /// Prefix replacement map for source file information.
-  std::map<const std::string, const std::string> DebugPrefixMap;
+  std::map<std::string, const std::string, std::greater<std::string>>
+      DebugPrefixMap;
----------------
MaskRay wrote:
> dankm wrote:
> > What happened to the const qualifier here?
> const key is very uncommon and constness usually doesn't matter (value_type adds const to the key type anyway).
Ah, missed that in the std::map spec. It makes sense that keys are always const, just didn't know it was guaranteed. Thanks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132390



More information about the llvm-commits mailing list