summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2017-12-08 23:32:47 +0000
committerAdrian Prantl <aprantl@apple.com>2017-12-08 23:32:47 +0000
commit01fb31cc89d3ce145f3cacd669981de5edd5de8d (patch)
tree7b4a7c803dfe70955aff3f39fabfdc12feed6a24 /llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
parente29f50da4dacf15faa5c306c4196679b95bdb0bc (diff)
downloadbcm5719-llvm-01fb31cc89d3ce145f3cacd669981de5edd5de8d.tar.gz
bcm5719-llvm-01fb31cc89d3ce145f3cacd669981de5edd5de8d.zip
dwarfdump: Add support for the --diff option.
--diff Emit the output in a diff-friendly way by omitting offsets and addresses. <rdar://problem/34502625> llvm-svn: 320214
Diffstat (limited to 'llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp')
-rw-r--r--llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
index 40a90e1662d..71db88ad9db 100644
--- a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
+++ b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
@@ -136,6 +136,10 @@ static list<std::string>
"name or by number. This option can be specified "
"multiple times, once for each desired architecture."),
cat(DwarfDumpCategory));
+static opt<bool>
+ Diff("diff",
+ desc("Emit diff-friendly output by omitting offsets and addresses."),
+ cat(DwarfDumpCategory));
static list<std::string>
Find("find",
desc("Search for the exact match for <name> in the accelerator tables "
@@ -237,6 +241,7 @@ static DIDumpOptions getDumpOpts() {
DIDumpOptions DumpOpts;
DumpOpts.DumpType = DumpType;
DumpOpts.RecurseDepth = RecurseDepth;
+ DumpOpts.ShowAddresses = !Diff;
DumpOpts.ShowChildren = ShowChildren;
DumpOpts.ShowParents = ShowParents;
DumpOpts.ShowForm = ShowForm;
OpenPOWER on IntegriCloud