HomePhabricator

[Clang][CodeGen] set alias linkage on QualType

Description

[Clang][CodeGen] set alias linkage on QualType

Summary:
It seems that CodeGen was always using ExternalLinkage when emitting a
GlobalDecl with attribute((alias)). This leads to symbol
redefinitions (ODR) that cause failures at link time for static aliases.
This is readily attempting to link an ARM (32b) allyesconfig Linux
kernel built with Clang.

Reported-by: nathanchance
Suggested-by: ihalip
Link: https://bugs.llvm.org/show_bug.cgi?id=42377
Link: https://github.com/ClangBuiltLinux/linux/issues/631

Reviewers: rsmith, aaron.ballman, erichkeane

Reviewed By: aaron.ballman

Subscribers: javed.absar, kristof.beyls, cfe-commits, srhines, ihalip, nathanchance

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66492

Details

Committed
nickdesaulniersAug 22 2019, 1:47 PM
Reviewer
aaron.ballman
Differential Revision
D66492: [Clang][CodeGen] set alias linkage on QualType
Parents
rL369704: LibFuzzer support for 32bit MSVC
Branches
Unknown
Tags
Unknown