[PATCH] D134544: [clang-cl] Implement /ZH: flag

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 25 08:04:39 PDT 2022


thakis added inline comments.


================
Comment at: clang/include/clang/Basic/CodeGenOptions.h:106
+  enum SrcHashAlgorithm {
+    CSK_MD5,
+    CSK_SHA1,
----------------
hans wrote:
> thakis wrote:
> > hans wrote:
> > > what does CSK stand for here?
> > I'm guessing "check sum kind", but I don't know :)
> > 
> > `SHA_` looks a bit funny as prefix too...
> > 
> > I also don't love the cc1 flag name, but I figured it's a bit bikesheddy and it's internal only so i kept it as is.
> > 
> > If you have a preference for flag name, enum name, and enum prefix, let me know.
> How about
> 
> `enum DebugSrcHashKind { DSH_MD5, ...`
> 
> ("kind" seems a common suffix for these, "debug" is a nice hint about what area this applies to.)
DebugSourceHash it is.


================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:377
+  }
+  return CSKind;
 }
----------------
hans wrote:
> Perhaps it would be simpler to drop the CSKind variable and fold the return into the individual cases?
Oh, that's much nicer, thanks.


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

https://reviews.llvm.org/D134544



More information about the cfe-commits mailing list