mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-15 05:25:55 +00:00
simplify some logic by using isWeakForLinker(). Thanks to Anton for
pointing this out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74700 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0dabb0b177
commit
2067433852
@ -188,9 +188,7 @@ namespace {
|
||||
if (TM.getRelocationModel() != Reloc::Static) {
|
||||
if (MO.getType() == MachineOperand::MO_GlobalAddress) {
|
||||
GlobalValue *GV = MO.getGlobal();
|
||||
if (((GV->isDeclaration() || GV->hasWeakLinkage() ||
|
||||
GV->hasLinkOnceLinkage() || GV->hasCommonLinkage() ||
|
||||
GV->hasAvailableExternallyLinkage()))) {
|
||||
if (GV->isDeclaration() || GV->isWeakForLinker()) {
|
||||
// Dynamically-resolved functions need a stub for the function.
|
||||
std::string Name = Mang->getValueName(GV);
|
||||
FnStubs.insert(Name);
|
||||
@ -383,8 +381,7 @@ void PPCAsmPrinter::printOp(const MachineOperand &MO) {
|
||||
|
||||
// External or weakly linked global variables need non-lazily-resolved stubs
|
||||
if (TM.getRelocationModel() != Reloc::Static) {
|
||||
if (GV->isDeclaration() || GV->isWeakForLinker() ||
|
||||
GV->hasAvailableExternallyLinkage()) {
|
||||
if (GV->isDeclaration() || GV->isWeakForLinker()) {
|
||||
if (GV->hasHiddenVisibility()) {
|
||||
if (GV->isDeclaration() || GV->hasCommonLinkage() ||
|
||||
GV->hasAvailableExternallyLinkage()) {
|
||||
|
Loading…
Reference in New Issue
Block a user