[PATCH] D87656: [llvm-dwarfdump] --show-sources option to show all sources
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 14 19:05:25 PDT 2020
dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.
Sounds alright - few things could be simplified, etc.
================
Comment at: llvm/test/tools/llvm-dwarfdump/X86/sources.s:12-58
+ .type basic, at function
+basic: # @basic
+.Lfunc_begin0:
+ .file 1 "/path/to/source" "./basic.h"
+ .loc 1 1 0 # ./basic.h:1:0
+ .cfi_startproc
+# %bb.0: # %entry
----------------
Maybe simplify the functions (to something like simple void/do-nothing functions) to reduce the length of the assembly, no need for types.
================
Comment at: llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp:462
+ FullPath))
+ Sources.push_back(FullPath);
+ }
----------------
Could use std::move(FullPath) here, if you like, but hardly critical.
================
Comment at: llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp:465
+ }
+ std::sort(Sources.begin(), Sources.end());
+ Sources.erase(std::unique(Sources.begin(), Sources.end()), Sources.end());
----------------
Could use llvm::sort here
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87656/new/
https://reviews.llvm.org/D87656
More information about the llvm-commits
mailing list