1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

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

llvm-svn: 78937
This commit is contained in:
Bruno Cardoso Lopes 2009-08-13 21:08:56 +00:00
parent aeed373413
commit 15f3e9a5fa
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;
}