[clang] [Clang] Add explicit visibility symbol macros (PR #108276)

Nikolas Klauser via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 9 08:44:47 PDT 2024


================
@@ -0,0 +1,63 @@
+//===-- clang/Support/Compiler.h - Compiler abstraction support -*- 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 explicit visibility macros used to export symbols from
+// clang-cpp
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef CLANG_SUPPORT_COMPILER_H
+#define CLANG_SUPPORT_COMPILER_H
+
+#include "llvm/Support/Compiler.h"
+
+/// CLANG_ABI is the main export/visibility macro to mark something as
+/// explicitly exported when clang is built as a shared library with everything
+/// else that is unannotated having internal visibility.
----------------
philnik777 wrote:

You probably mean hidden visibility? Internal visibility is something slightly different and probably not what you want.

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


More information about the cfe-commits mailing list