[clang] [clang][ssaf] Add EntityLinkage data structure (PR #181718)

Aviral Goel via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 16 11:26:04 PST 2026


================
@@ -0,0 +1,50 @@
+//===- EntityLinkage.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_MODEL_ENTITYLINKAGE_H
+#define LLVM_CLANG_ANALYSIS_SCALABLE_MODEL_ENTITYLINKAGE_H
+
+namespace clang::ssaf {
+
+/// Represents the linkage properties of an entity in the program model.
+///
+/// EntityLinkage captures whether an entity has no linkage, internal linkage,
+/// or external linkage, which determines its visibility and accessibility
+/// across translation units.
+class EntityLinkage {
+  friend class SerializationFormat;
+
+public:
+  /// Specifies the type of linkage an entity has.
----------------
aviralg wrote:

I agree that comments are redundant here. I added them because we will generate documentation for the APIs at some point and this text will be useful. 

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


More information about the cfe-commits mailing list