Skip to content

[llvm] simplify and clean-up DemangleConfig.h #149163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andrurogerz
Copy link
Contributor

Purpose

Simplify DEMANGLE_ macro definitions in llvm/Demangle/DemangleConfig.h for clarity/maintainability.

Overview

  • Alias DEMANGLE_DUMP_METHOD, DEMANGLE_FALLTHROUGH, and DEMANGLE_UNREACHABLE macros to their LLVM_ counterparts defined in llvm/Support/Compiler.h
  • Remove several DEMANGLE_-prefixed macros that were only used within DemangleConfig.h

Background

  • It should be safe for the Demangle component library to depend on Support, so there is no need for it to maintain copies of macros defined in llvm/Support/Compiler.h.
  • Since the canonical copy llvm/Demangle/ItaniumDemangle.h lives under libcxxabi, it cannot directly reference the LLVM_-prefixed macros so we define DEMANGLE_-prefixed aliases.

Validation

  • Built llvm-project on Windows with clang-cl and MSVC cl.
  • Built llvm-project on Linux with clang and gcc.

@andrurogerz andrurogerz marked this pull request as ready for review July 16, 2025 19:53
Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants