Add a method to return if the ELF section contains only common symbols!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78937 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bruno Cardoso Lopes 2009-08-13 21:08:56 +00:00
parent 2907542a3f
commit 4aa688e997
2 changed files with 13 additions and 0 deletions

View File

@ -55,6 +55,9 @@ public:
/// ShouldPrintSectionType - Only prints the section type if supported
bool ShouldPrintSectionType(unsigned Ty) const;
/// IsCommon - True if this section contains only common symbols
bool IsCommon() const;
/// These are the section type and flags fields. An ELF section can have
/// only one Type, but can have more than one of the flags specified.

View File

@ -121,3 +121,13 @@ void MCSectionELF::PrintSwitchToSection(const TargetAsmInfo &TAI,
OS << '\n';
}
// IsCommon - True if this section contains only common symbols
bool MCSectionELF::IsCommon() const {
if (strncmp(SectionName.c_str(), ".gnu.linkonce.", 14) == 0)
return true;
return false;
}