const std::string& getName() const { return Name; }
unsigned getFlags() const { return Flags; }
+
+ bool hasFlag(unsigned F) const { return (Flags & F) != 0; }
};
/// TargetAsmInfo - This class is intended to be used as a base class for asm
SwitchToSection(TheSection);
if (C->isNullValue() && !GVar->hasSection() && !GVar->isThreadLocal() &&
- !(isDarwin && TheSection->getFlags() == SectionKind::RODataMergeStr)) {
- // FIXME: This seems to be pretty darwin-specific
-
+ // Don't put things that should go in the cstring section into "comm".
+ !TheSection->hasFlag(SectionFlags::Strings)) {
if (GVar->hasExternalLinkage()) {
if (const char *Directive = TAI->getZeroFillDirective()) {
O << "\t.globl\t" << name << "\n";
!GVar->hasSection() &&
(GVar->hasLocalLinkage() || GVar->hasExternalLinkage() ||
GVar->isWeakForLinker()) &&
- TheSection->getFlags() != SectionKind::RODataMergeStr) {
+ // Don't put things that should go in the cstring section into "comm".
+ !TheSection->hasFlag(SectionFlags::Strings)) {
if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it.
if (GVar->hasExternalLinkage()) {
SwitchToSection(TheSection);
if (C->isNullValue() && !GVar->hasSection() &&
- !(Subtarget->isTargetDarwin() &&
- TAI->SectionKindForGlobal(GVar) == SectionKind::RODataMergeStr)) {
- // FIXME: This seems to be pretty darwin-specific
+ // Don't put things that should go in the cstring section into "comm".
+ !TheSection->hasFlag(SectionFlags::Strings)) {
if (GVar->hasExternalLinkage()) {
if (const char *Directive = TAI->getZeroFillDirective()) {
O << "\t.globl " << name << '\n';