[clang] [clang][ssaf] Add EntityId and EntityIdTable for efficient entity handling (PR #171660)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 11 03:13:00 PST 2025


================
@@ -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 {
----------------
Xazax-hun wrote:

Nit: use nested namespace syntax `clang::ssaf`. 

https://github.com/llvm/llvm-project/pull/171660


More information about the cfe-commits mailing list