[PATCH] D48988: Debug prefix map for machine code emission

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 9 10:52:08 PDT 2018


probinson added a comment.

Some minor things.  clang-format-diff is your friend. :-)



================
Comment at: include/llvm/MC/MCContext.h:497
+    /// Get the debug prefix map.
+    const std::map<const std::string, const std::string> &getDebugPrefixMap() const {
+      return DebugPrefixMap;
----------------
This looks longer than 80 columns.  clang-format-diff will fix this kind of thing for you.
Or use a typedef for the map.


================
Comment at: lib/MC/MCContext.cpp:538
 
+void MCContext::addDebugPrefixMapEntry(const std::string &From, const std::string &To) {
+  DebugPrefixMap.insert(std::make_pair(From, To));
----------------
80-column violation?


================
Comment at: test/MC/ELF/debug-prefix-map.s:5
+
+// RUN: llvm-mc -triple=x86_64-linux-unknown -dwarf-version 5 -g src.s -filetype=obj -o out.o
+// RUN: llvm-dwarfdump -v -debug-info out.o | FileCheck --check-prefix=NO_MAP %s
----------------
Can you omit the `-dwarf-version 5` as I think this should work for any version.


Repository:
  rL LLVM

https://reviews.llvm.org/D48988





More information about the llvm-commits mailing list