/// false.
bool HasAltEntry = false;
- /// True if this target supports the XCOFF .extern directive. Defaults to
- /// false.
- bool HasDotExternDirective = false;
-
/// Used to declare a global as being a weak symbol. Defaults to ".weak".
const char *WeakDirective;
/// Defaults to false.
bool AvoidWeakIfComdat = false;
- /// True if we have a .lglobl directive, which is used to emit the information
- /// of a static symbol into the symbol table. Defaults to false.
- bool HasDotLGloblDirective = false;
-
/// This attribute, if not MCSA_Invalid, is used to declare a symbol as having
/// hidden visibility. Defaults to MCSA_Hidden.
MCSymbolAttr HiddenVisibilityAttr = MCSA_Hidden;
bool hasIdentDirective() const { return HasIdentDirective; }
bool hasNoDeadStrip() const { return HasNoDeadStrip; }
bool hasAltEntry() const { return HasAltEntry; }
- bool hasDotExternDirective() const { return HasDotExternDirective; }
const char *getWeakDirective() const { return WeakDirective; }
const char *getWeakRefDirective() const { return WeakRefDirective; }
bool hasWeakDefDirective() const { return HasWeakDefDirective; }
bool avoidWeakIfComdat() const { return AvoidWeakIfComdat; }
- bool hasDotLGloblDirective() const { return HasDotLGloblDirective; }
-
MCSymbolAttr getHiddenVisibilityAttr() const { return HiddenVisibilityAttr; }
MCSymbolAttr getHiddenDeclarationVisibilityAttr() const {
GlobalValue::LinkageTypes Linkage = GV->getLinkage();
switch (Linkage) {
case GlobalValue::CommonLinkage:
- assert(!TM.getTargetTriple().isOSBinFormatXCOFF() &&
- "CommonLinkage of XCOFF should not come to this path.");
- LLVM_FALLTHROUGH;
case GlobalValue::LinkOnceAnyLinkage:
case GlobalValue::LinkOnceODRLinkage:
case GlobalValue::WeakAnyLinkage:
}
return;
case GlobalValue::ExternalLinkage:
- if (MAI->hasDotExternDirective() && GV->isDeclaration())
- OutStreamer->emitSymbolAttribute(GVSym, MCSA_Extern);
- else
- OutStreamer->emitSymbolAttribute(GVSym, MCSA_Global);
+ OutStreamer->emitSymbolAttribute(GVSym, MCSA_Global);
return;
case GlobalValue::PrivateLinkage:
- return;
case GlobalValue::InternalLinkage:
- if (MAI->hasDotLGloblDirective())
- OutStreamer->emitSymbolAttribute(GVSym, MCSA_LGlobal);
return;
case GlobalValue::ExternalWeakLinkage:
- if (TM.getTargetTriple().isOSBinFormatXCOFF()) {
- OutStreamer->emitSymbolAttribute(GVSym, MCSA_Weak);
- return;
- }
- LLVM_FALLTHROUGH;
case GlobalValue::AvailableExternallyLinkage:
- if (MAI->hasDotExternDirective()) {
- OutStreamer->emitSymbolAttribute(GVSym, MCSA_Extern);
- return;
- }
- LLVM_FALLTHROUGH;
case GlobalValue::AppendingLinkage:
llvm_unreachable("Should never emit this");
}
COMMDirectiveAlignmentIsInBytes = false;
LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;
HasDotTypeDotSizeDirective = false;
- HasDotExternDirective = true;
- HasDotLGloblDirective = true;
SymbolsHaveSMC = true;
UseIntegratedAssembler = false;
NeedsFunctionDescriptors = true;
case GlobalValue::PrivateLinkage:
return;
case GlobalValue::InternalLinkage:
- assert(MAI->hasDotLGloblDirective() &&
- "Expecting .lglobl to be supported for AIX.");
OutStreamer->emitSymbolAttribute(GVSym, MCSA_LGlobal);
return;
case GlobalValue::AppendingLinkage: