================
@@ -43,21 +43,22 @@ void 
ClangTidyProfiling::printUserFriendlyTable(llvm::raw_ostream &OS,
 }
 
 void ClangTidyProfiling::printAsJSON(llvm::raw_ostream &OS,
-                                     llvm::TimerGroup &TG) {
+                                     llvm::TimerGroup &TG,
+                                     const StorageParams &Storage) {
   OS << "{\n";
-  OS << R"("file": ")" << Storage->SourceFilename << "\",\n";
-  OS << R"("timestamp": ")" << Storage->Timestamp << "\",\n";
+  OS << R"("file": ")" << Storage.SourceFilename << "\",\n";
+  OS << R"("timestamp": ")" << Storage.Timestamp << "\",\n";
   OS << "\"profile\": {\n";
   TG.printJSONValues(OS, "");
   OS << "\n}\n";
   OS << "}\n";
   OS.flush();
 }
 
-void ClangTidyProfiling::storeProfileData(llvm::TimerGroup &TG) {
-  assert(Storage && "We should have a filename.");
-
-  llvm::SmallString<256> OutputDirectory(Storage->StoreFilename);
+void ClangTidyProfiling::storeProfileData(llvm::TimerGroup &TG,
+                                          const StorageParams &Storage) {
+  assert(this->Storage && "We should have a filename.");
----------------
vbvictor wrote:

If we asserted here, then we can just use `Storage` that comes from `this` 
without any more modifications?

https://github.com/llvm/llvm-project/pull/170004
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to