diff options
Diffstat (limited to 'llvm/include/llvm/MC/MCAsmInfo.h')
-rw-r--r-- | llvm/include/llvm/MC/MCAsmInfo.h | 47 |
1 files changed, 28 insertions, 19 deletions
diff --git a/llvm/include/llvm/MC/MCAsmInfo.h b/llvm/include/llvm/MC/MCAsmInfo.h index 5a6dff64caef..46c5a111c891 100644 --- a/llvm/include/llvm/MC/MCAsmInfo.h +++ b/llvm/include/llvm/MC/MCAsmInfo.h @@ -93,6 +93,10 @@ protected: /// constants into comdat sections. bool HasCOFFComdatConstants = false; + /// True if this is an XCOFF target that supports visibility attributes as + /// part of .global, .weak, .extern, and .comm. Default is false. + bool HasVisibilityOnlyWithLinkage = false; + /// This is the maximum possible length of an instruction, which is needed to /// compute the size of an inline asm. Defaults to 4. unsigned MaxInstLength = 4; @@ -156,6 +160,10 @@ protected: /// Defaults to false. bool AllowAtInName = false; + /// This is true if the assembler allows $ @ ? characters at the start of + /// symbol names. Defaults to false. + bool AllowSymbolAtNameStart = false; + /// If this is true, symbol names with invalid characters will be printed in /// quotes. bool SupportsQuotedNames = true; @@ -171,12 +179,17 @@ protected: //===--- Data Emission Directives -------------------------------------===// - /// This should be set to the directive used to get some number of zero bytes - /// emitted to the current section. Common cases are "\t.zero\t" and - /// "\t.space\t". If this is set to null, the Data*bitsDirective's will be - /// used to emit zero bytes. Defaults to "\t.zero\t" + /// This should be set to the directive used to get some number of zero (and + /// non-zero if supported by the directive) bytes emitted to the current + /// section. Common cases are "\t.zero\t" and "\t.space\t". Defaults to + /// "\t.zero\t" const char *ZeroDirective; + /// This should be set to true if the zero directive supports a value to emit + /// other than zero. If this is set to false, the Data*bitsDirective's will be + /// used to emit these bytes. Defaults to true. + bool ZeroDirectiveSupportsNonZeroValue = true; + /// This directive allows emission of an ascii string with the standard C /// escape characters embedded into it. If a target doesn't support this, it /// can be set to null. Defaults to "\t.ascii\t" @@ -313,13 +326,10 @@ protected: /// symbol that can be hidden (unexported). Defaults to false. bool HasWeakDefCanBeHiddenDirective = false; - /// True if we have a .linkonce directive. This is used on cygwin/mingw. + /// True if we should mark symbols as global instead of weak, for + /// weak*/linkonce*, if the symbol has a comdat. /// Defaults to false. - bool HasLinkOnceDirective = 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; + bool AvoidWeakIfComdat = false; /// This attribute, if not MCSA_Invalid, is used to declare a symbol as having /// hidden visibility. Defaults to MCSA_Hidden. @@ -333,10 +343,6 @@ protected: /// protected visibility. Defaults to MCSA_Protected MCSymbolAttr ProtectedVisibilityAttr = MCSA_Protected; - // This attribute is used to indicate symbols such as commons on AIX may have - // a storage mapping class embedded in the name. - bool SymbolsHaveSMC = false; - //===--- Dwarf Emission Directives -----------------------------------===// /// True if target supports emission of debugging information. Defaults to @@ -492,6 +498,9 @@ public: bool hasMachoTBSSDirective() const { return HasMachoTBSSDirective; } bool hasCOFFAssociativeComdats() const { return HasCOFFAssociativeComdats; } bool hasCOFFComdatConstants() const { return HasCOFFComdatConstants; } + bool hasVisibilityOnlyWithLinkage() const { + return HasVisibilityOnlyWithLinkage; + } /// Returns the maximum possible encoded instruction size in bytes. If \p STI /// is null, this should be the maximum size for any subtarget. @@ -532,6 +541,7 @@ public: const char *getCode64Directive() const { return Code64Directive; } unsigned getAssemblerDialect() const { return AssemblerDialect; } bool doesAllowAtInName() const { return AllowAtInName; } + bool doesAllowSymbolAtNameStart() const { return AllowSymbolAtNameStart; } bool supportsNameQuoting() const { return SupportsQuotedNames; } bool doesSupportDataRegionDirectives() const { @@ -543,6 +553,9 @@ public: } const char *getZeroDirective() const { return ZeroDirective; } + bool doesZeroDirectiveSupportNonZeroValue() const { + return ZeroDirectiveSupportsNonZeroValue; + } const char *getAsciiDirective() const { return AsciiDirective; } const char *getAscizDirective() const { return AscizDirective; } bool getAlignmentIsInBytes() const { return AlignmentIsInBytes; } @@ -577,9 +590,7 @@ public: return HasWeakDefCanBeHiddenDirective; } - bool hasLinkOnceDirective() const { return HasLinkOnceDirective; } - - bool hasDotLGloblDirective() const { return HasDotLGloblDirective; } + bool avoidWeakIfComdat() const { return AvoidWeakIfComdat; } MCSymbolAttr getHiddenVisibilityAttr() const { return HiddenVisibilityAttr; } @@ -591,8 +602,6 @@ public: return ProtectedVisibilityAttr; } - bool getSymbolsHaveSMC() const { return SymbolsHaveSMC; } - bool doesSupportDebugInformation() const { return SupportsDebugInformation; } bool doesSupportExceptionHandling() const { |