[PATCH] D123100: [Support/Hash functions] Change the `final()` and `result()` of the hashing functions to return an array of bytes
Argyrios Kyrtzidis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 5 09:21:23 PDT 2022
akyrtzi added inline comments.
================
Comment at: bolt/lib/Core/DebugData.cpp:823
Hasher.update(AbbrevData);
- StringRef Key = Hasher.final();
+ auto Hash = Hasher.final();
+ StringRef Key((const char *)Hash.data(), Hash.size());
----------------
jhenderson wrote:
> Amir wrote:
> > I think it would be more in line with LLVM coding standards to expand `auto` in this case (and others) – see https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable.
> > My understanding is that `auto` is fine where the type is obvious from the context (is explicitly available on the same line e.g. with casts), is abstract (T::iterator types), or doesn't matter (e.g. lambdas).
> +1 (also relevant in other places in this patch)
Updated 👍
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123100/new/
https://reviews.llvm.org/D123100
More information about the llvm-commits
mailing list