[PATCH] [dwarfdump] Implement extraction of file information referenced in .debug_info.

Alexey Samsonov vonosmas at gmail.com
Fri Sep 19 15:59:43 PDT 2014


Looks good modulo a couple of nits below.

================
Comment at: lib/DebugInfo/DWARFDebugInfoEntry.cpp:93
@@ +92,3 @@
+  if (attr == DW_AT_decl_file || attr == DW_AT_call_file) {
+    const auto *LT = u->getContext().getLineTableForUnit(u);
+    if (LT &&
----------------
You can rewrite it as:
  if (const auto *LT = ...) {
    LT->getFileNameByIndex(...);
     ...
  }

================
Comment at: lib/DebugInfo/DWARFDebugInfoEntry.cpp:99
@@ +98,3 @@
+           DILineInfoSpecifier::FileLineInfoKind::AbsoluteFilePath, File)) {
+      File = '"' + std::move(File) + '"';
+      Name = File.c_str();
----------------
std::move looks confusing here.

http://reviews.llvm.org/D5192






More information about the llvm-commits mailing list