[PATCH] D75305: [AIX] Handle LinkOnceODRLinkage and llvm.global_ctors/dtors' AppendingLinkage
Hubert Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 28 11:41:38 PST 2020
hubert.reinterpretcast added inline comments.
================
Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:1952
+ case GlobalValue::AppendingLinkage:
+ llvm_unreachable("Should never emit it.");
default:
----------------
As it stands, users can pass in IR with such linkage. This should be `report_fatal_error` because this is indeed reachable without being a clear bug elsewhere.
As for the text, it should say something like `"There is no mapping that implements AppendingLinkage for XCOFF."`
================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1589
+ return StringSwitch<bool>(GV->getName())
+ .Cases("llvm.global_ctors", "llvm.global_dtors", true)
+ .Default(false);
----------------
This list does not match `AsmPrinter::EmitSpecialLLVMGlobal`. I do not believe this function as it is named and implemented is okay.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75305/new/
https://reviews.llvm.org/D75305
More information about the llvm-commits
mailing list