[clang] [Clang][CodeGen] Report when an alias points to an incompatible target (PR #192397)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 16 07:26:17 PDT 2026
================
@@ -59,7 +59,7 @@ extern void f1(void) __attribute((alias("f0")));
static inline int foo1() { return 0; }
// CHECKBASIC-LABEL: define internal i32 @foo1()
int foo() __attribute__((alias("foo1")));
-int bar() __attribute__((alias("bar1")));
+extern int bar __attribute__((alias("bar1")));
----------------
AaronBallman wrote:
Why is this change necessary? `bar` was already extern.
Actually, why is this not rejected? `bar1` is an object so I would assume the function couldn't alias the variable.
https://github.com/llvm/llvm-project/pull/192397
More information about the cfe-commits
mailing list