aboutsummaryrefslogtreecommitdiffstats
path: root/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
commite49a3e450ca38e41898af205839e284787191f89 (patch)
treec678db29411c95308299cc9c35749aa777d5de1c /lib/MC/MCSectionELF.cpp
parente105f60dc6b5459ace3a847d33988ae6af850dc1 (diff)
downloadexternal_llvm-e49a3e450ca38e41898af205839e284787191f89.zip
external_llvm-e49a3e450ca38e41898af205839e284787191f89.tar.gz
external_llvm-e49a3e450ca38e41898af205839e284787191f89.tar.bz2
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
Diffstat (limited to 'lib/MC/MCSectionELF.cpp')
-rw-r--r--lib/MC/MCSectionELF.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/MC/MCSectionELF.cpp b/lib/MC/MCSectionELF.cpp
index d172a9c..56f8034 100644
--- a/lib/MC/MCSectionELF.cpp
+++ b/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;
+}
+
+