diff options
| author | Peter Rong <peterrong96@gmail.com> | 2025-04-30 09:37:55 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-30 09:37:55 -0700 |
| commit | 0bd992a8d7193e15191f14a4bd39fd4dd181dbdb (patch) | |
| tree | 06c4b5b3a3b225dcd6d7bf0100b4a094365f8ef2 /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | d7f096e3fe611ae2cc7403c3cf2f88255a47b61d (diff) | |
[clang AST] move mangling API to namespace clang to allow calls from swift-frontend (#137884)
When implementing `@objcDirect` in Swift, Swift needs to mangle a native
`Decl` that is not a clang Node, which in turn don't have access to
`clang::MangleContext`. Reimplementing mangling logic in Swift is
redundant.
This patch moves mangling logic from `clang::MangleContext` to `clang`
using only basic types (`StringRef`, `std::optional`, etc.), such that
Swift can we can just call Clang API: Swift depends on Clang already.
We are separating this from #126639 so we can draft the proposal on the
Swift side. #126639 will be worked to depend on this PR.
Tests: No new tests, old ones should pass with no problem.
---------
Signed-off-by: Peter Rong <PeterRong@meta.com>
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions
