[PATCH] D148045: [NFC][Symbolizer] Refactor out ProcessContext

Daniel Thornburgh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 2 11:17:16 PDT 2023


mysterymath marked an inline comment as done.
mysterymath added inline comments.


================
Comment at: llvm/lib/DebugInfo/Symbolize/ProcessContext.cpp:53
+        JOS.attribute("type", "elf");
+        JOS.attribute("buildID", toHex(Module->BuildID, /*LowerCase=*/true));
+        JOS.objectEnd();
----------------
mcgrathr wrote:
> I'm not partial to mixed-case for JSON keys in the schema.
> I know I'm coming in late since this is just refactoring the generation code and the JSON schema details are outside the scope of this change per se. But I imagine it's all still new enough and in flux such that we can refine it freely.
> 
> I'd use "build_id" here, but "buildid" would also be fine if underscores are undesirable in some quarters.
> 
I did a quick look around the larger JSON-verse to try to see which way the wind was blowing, and it looks like camelCase is the de-facto standard due to JS's influence.
It's the official recommendation of a number of JSON standards (e.g., Google's JSON Style Guide, schema.org, JSON-API), while I couldn't find anything mandating snake, kebab, or Pascal case
I wasn't particularly scientific about this though, and IIRC, I've observed all four conventions in the LLVM codebase.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148045



More information about the llvm-commits mailing list