llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-analysis

Author: Jan Korous (jkorous-apple)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/176504.diff


2 Files Affected:

- (added) clang/include/clang/Analysis/Scalable/TUSummary/TUSummary.h (+37) 
- (added) clang/include/clang/Analysis/Scalable/TUSummary/TUSummaryData.h (+33) 


``````````diff
diff --git a/clang/include/clang/Analysis/Scalable/TUSummary/TUSummary.h 
b/clang/include/clang/Analysis/Scalable/TUSummary/TUSummary.h
new file mode 100644
index 0000000000000..6f59c63115dc8
--- /dev/null
+++ b/clang/include/clang/Analysis/Scalable/TUSummary/TUSummary.h
@@ -0,0 +1,37 @@
+//===- TUSummary.h ----------------------------------------------*- C++ 
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_ANALYSIS_SCALABLE_TUSUMMARY_TUSUMMARY_H
+#define LLVM_CLANG_ANALYSIS_SCALABLE_TUSUMMARY_TUSUMMARY_H
+
+#include "clang/Analysis/Scalable/Model/BuildNamespace.h"
+#include "clang/Analysis/Scalable/Model/EntityId.h"
+#include "clang/Analysis/Scalable/Model/EntityIdTable.h"
+#include "clang/Analysis/Scalable/Model/SummaryName.h"
+#include "clang/Analysis/Scalable/TUSummary/TUSummaryData.h"
+#include <map>
+#include <memory>
+
+namespace clang::ssaf {
+
+/// Data extracted for a given translation unit and for a given set of 
analyses.
+class TUSummary {
+  /// Identifies the translation unit.
+  BuildNamespace TUNamespace;
+  EntityIdTable IdTable;
+
+  std::map<SummaryName, std::map<EntityId, std::unique_ptr<TUSummaryData>>>
+      Data;
+
+public:
+  TUSummary(BuildNamespace TUNamespace) : TUNamespace(std::move(TUNamespace)) 
{}
+};
+
+} // namespace clang::ssaf
+
+#endif // LLVM_CLANG_ANALYSIS_SCALABLE_TUSUMMARY_TUSUMMARY_H
diff --git a/clang/include/clang/Analysis/Scalable/TUSummary/TUSummaryData.h 
b/clang/include/clang/Analysis/Scalable/TUSummary/TUSummaryData.h
new file mode 100644
index 0000000000000..57b28d5f25308
--- /dev/null
+++ b/clang/include/clang/Analysis/Scalable/TUSummary/TUSummaryData.h
@@ -0,0 +1,33 @@
+//===- TUSummaryData.h ------------------------------------------*- C++ 
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_ANALYSIS_SCALABLE_TUSUMMARY_TUSUMMARYDATA_H
+#define LLVM_CLANG_ANALYSIS_SCALABLE_TUSUMMARY_TUSUMMARYDATA_H
+
+#include "clang/Analysis/Scalable/Model/SummaryName.h"
+
+namespace clang::ssaf {
+
+/// Base class for analysis-specific summary data.
+class TUSummaryData {
+private:
+  /// Name of the summary.
+  SummaryName Summary;
+
+protected:
+  TUSummaryData(SummaryName Summary) : Summary(std::move(Summary)) {}
+
+public:
+  SummaryName getSummaryName() const { return Summary; }
+
+  virtual ~TUSummaryData() = default;
+};
+
+} // namespace clang::ssaf
+
+#endif // LLVM_CLANG_ANALYSIS_SCALABLE_TUSUMMARY_TUSUMMARYDATA_H

``````````

</details>


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

Reply via email to