================
@@ -915,7 +915,10 @@ Error JSONGenerator::serializeIndex(StringRef RootDir) {
raw_fd_ostream RootOS(IndexFilePath, FileErr, sys::fs::OF_Text);
if (FileErr)
return createFileError("cannot open file " + IndexFilePath, FileErr);
- RootOS << llvm::formatv("{0:2}", ObjVal);
+ if (CDCtx->CompactJSON)
+ RootOS << llvm::formatv("{0}", ObjVal);
+ else
+ RootOS << llvm::formatv("{0:2}", ObjVal);
----------------
ilovepi wrote:
we only do this in 2 spots, but maybe we want some wrapper class that controls
these options. and lives in the CDCtx? not a major deal ATM, but if we think we
want any more control/customization, we may want to consider it.
https://github.com/llvm/llvm-project/pull/190822
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits