This is an archive of the discontinued LLVM Phabricator instance.

AIX: Issue an error when specifying an alias for a common symbol
ClosedPublic

Authored by stephenpeckham on Aug 24 2023, 7:39 AM.

Details

Summary

There is no support in XCOFF for labels on common symbols. Therefore, an alias for a common symbol is not supported. Issue an error in the front end when an aliasee is a common symbol. Issue a similar error in the back end in case an IR specifies an alias for a common symbol.

Diff Detail

Event Timeline

stephenpeckham created this revision.Aug 24 2023, 7:39 AM
stephenpeckham requested review of this revision.Aug 24 2023, 7:39 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 24 2023, 7:39 AM
DiggerLin added inline comments.Aug 28 2023, 12:07 PM
clang/lib/CodeGen/CodeGenModule.cpp
566–567

nit: change
ASTContext &Context
-->
const ASTContext &Context

llvm/test/CodeGen/PowerPC/aix-common.ll
16

CHECK:
-->
CHECK-NEXT:

Aside from the comments Digger has made, I have no additional concerns about this patch. It is an improvement (although there are adjacent cases that need further handling).

stephenpeckham marked 2 inline comments as done.
This revision is now accepted and ready to land.Aug 29 2023, 6:55 AM
This revision was landed with ongoing or failed builds.Aug 31 2023, 8:44 AM
This revision was automatically updated to reflect the committed changes.