forked from OSchip/llvm-project
Add a method to return if the ELF section contains only common symbols!
llvm-svn: 78937
This commit is contained in:
parent
e6e417149f
commit
df743ae603
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue