summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCSectionELF.cpp
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2009-08-13 21:08:56 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2009-08-13 21:08:56 +0000
commitdf743ae60322bc4c75d5df6213565bc4c9c8b8af (patch)
tree7017cd6b21ab30da25806670a5baabbe08285895 /llvm/lib/MC/MCSectionELF.cpp
parente6e417149f27aee3369fd35b9feee0ff1147c8ec (diff)
downloadbcm5719-llvm-df743ae60322bc4c75d5df6213565bc4c9c8b8af.tar.gz
bcm5719-llvm-df743ae60322bc4c75d5df6213565bc4c9c8b8af.zip
Add a method to return if the ELF section contains only common symbols!
llvm-svn: 78937
Diffstat (limited to 'llvm/lib/MC/MCSectionELF.cpp')
-rw-r--r--llvm/lib/MC/MCSectionELF.cpp10
1 files changed, 10 insertions, 0 deletions
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;
+}
+
+
OpenPOWER on IntegriCloud