================
@@ -0,0 +1,49 @@
+//===- EntityId.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
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the EntityId class, which provides a lightweight opaque
+// handle to entities in an EntityIdTable. EntityIds are index-based for
+// efficient comparison and lookup.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_ANALYSIS_SCALABLE_MODEL_ENTITY_ID_H
+#define LLVM_CLANG_ANALYSIS_SCALABLE_MODEL_ENTITY_ID_H
+
+#include <cstddef>
+
+namespace clang {
+namespace ssaf {
+
+class EntityIdTable;
+
+/// Lightweight opaque handle representing an entity in an EntityIdTable.
+///
+/// EntityIds are created by EntityIdTable. Equality and ordering comparisons
+/// are well-defined for EntityIds created by the same EntityIdTable.
+///
+/// \see EntityIdTable
+class EntityId {
+  friend class EntityIdTable;
+
+  size_t Index;
----------------
ymand wrote:

While I agree with you (in terms of preference), this seems to be the norm in 
clang as far as I've seen, fwiw.

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

Reply via email to