Amir 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());
----------------
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).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123100/new/

https://reviews.llvm.org/D123100

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to