[llvm] [llvm] ensure DEMANGLE_ABI is properly defined (PR #151023)
Andrew Rogers via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 28 11:57:37 PDT 2025
https://github.com/andrurogerz created https://github.com/llvm/llvm-project/pull/151023
## Overview
Include `llvm-config.h` from `DemangleConfig.h` so `LLVM_ENABLE_LLVM_EXPORT_ANNOTATIONS` is defined correctly. The presence of this definition controls the definition of `LLVM_ABI` on Windows DLL builds. This include was missed in #147564.
## Background
This effort is tracked in #109483. Additional context is provided in [this discourse](https://discourse.llvm.org/t/psa-annotating-llvm-public-interface/85307).
>From 5252eda5ad1a11ab9481738e204b7e75555e14bf Mon Sep 17 00:00:00 2001
From: Andrew Rogers <andrurogerz at gmail.com>
Date: Mon, 28 Jul 2025 11:36:05 -0700
Subject: [PATCH] ensure DEMANGLE_ABI is properly defined
---
llvm/include/llvm/Demangle/DemangleConfig.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/llvm/include/llvm/Demangle/DemangleConfig.h b/llvm/include/llvm/Demangle/DemangleConfig.h
index 7ee23a4546377..912c9b869bf7d 100644
--- a/llvm/include/llvm/Demangle/DemangleConfig.h
+++ b/llvm/include/llvm/Demangle/DemangleConfig.h
@@ -15,6 +15,9 @@
#ifndef LLVM_DEMANGLE_DEMANGLECONFIG_H
#define LLVM_DEMANGLE_DEMANGLECONFIG_H
+// llvm-config.h is required for LLVM_ENABLE_LLVM_EXPORT_ANNOTATIONS
+#include "llvm/Config/llvm-config.h"
+
#ifndef __has_feature
#define __has_feature(x) 0
#endif
More information about the llvm-commits
mailing list