From df743ae60322bc4c75d5df6213565bc4c9c8b8af Mon Sep 17 00:00:00 2001 From: Bruno Cardoso Lopes Date: Thu, 13 Aug 2009 21:08:56 +0000 Subject: Add a method to return if the ELF section contains only common symbols! llvm-svn: 78937 --- llvm/lib/MC/MCSectionELF.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'llvm/lib/MC/MCSectionELF.cpp') diff --git a/llvm/lib/MC/MCSectionELF.cpp b/llvm/lib/MC/MCSectionELF.cpp index d172a9c9230..56f803496ac 100644 --- a/llvm/lib/MC/MCSectionELF.cpp +++ b/llvm/lib/MC/MCSectionELF.cpp @@ -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; +} + + -- cgit v1.2.3