[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 cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 5 09:21:22 PDT 2022
akyrtzi added inline comments.
Comment at: bolt/lib/Core/DebugData.cpp:823
- StringRef Key = Hasher.final();
+ auto Hash = Hasher.final();
+ StringRef Key((const char *)Hash.data(), Hash.size());
> 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)
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the cfe-commits