[PATCH] D58085: [llvm-dwp] Abort when dwo_id is unset
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 11 16:22:17 PST 2019
dblaikie added inline comments.
================
Comment at: llvm/test/tools/llvm-dwp/X86/missing_dwo_id.test:3
+
+CHECK: error: {{.*}}missing_dwo_id.dwo': Compile unit missing dwo_id
----------------
This error starts with a capital ("C") and the other ("top level DIE is not ..." ) does not. Might be good to pick one way for the convention - I think probably non-capitals is the norm in these sort of diagnostics?
================
Comment at: llvm/tools/llvm-dwp/llvm-dwp.cpp:190-191
}
+ if (ID.Signature == 0)
+ return make_error<DWPError>("Compile unit missing dwo_id");
return ID;
----------------
In theory a hash could be zero, I think (it's not a blessed/allocated non-value for a hash function, so far as I would know/think) - so I think this would need to be wrapped in Optional (perhaps an an implementation detail of this function, the result structure doesn't have to expose this detail, necessarily - though perhaps callers need to know if this is valid to use or not, even when getCUIdentifiers succeeds)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58085/new/
https://reviews.llvm.org/D58085
More information about the llvm-commits
mailing list