[clang] [Clang] Allow vanilla C function symbol name to be used in __attribute__((alias)) when -funique-internal-linkage-names is specified (PR #145652)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 25 10:56:35 PDT 2025
================
@@ -598,6 +599,23 @@ static bool checkAliasedGlobal(
return false;
}
+ // Only resolve unique internal linkage symbols for C code
+ if (!CGM->getLangOpts().CPlusPlus) {
----------------
efriedma-quic wrote:
Is this C-only? Consider something like:
```
long bar(const struct A*p) __attribute__((__alias__("foo")));
namespace {
extern "C" long foo(const struct A*p) {return 1;}
}
```
https://github.com/llvm/llvm-project/pull/145652
More information about the cfe-commits
mailing list