aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/MC/MCSectionELF.h6
-rw-r--r--lib/CodeGen/ELFWriter.cpp2
-rw-r--r--lib/MC/MCSectionELF.cpp6
3 files changed, 9 insertions, 5 deletions
diff --git a/include/llvm/MC/MCSectionELF.h b/include/llvm/MC/MCSectionELF.h
index 8d23b285f3..1c2943a909 100644
--- a/include/llvm/MC/MCSectionELF.h
+++ b/include/llvm/MC/MCSectionELF.h
@@ -52,8 +52,10 @@ 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;
+ /// HasCommonSymbols - True if this section holds common symbols, this is
+ /// indicated on the ELF object file by a symbol with SHN_COMMON section
+ /// header index.
+ bool HasCommonSymbols() 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.
diff --git a/lib/CodeGen/ELFWriter.cpp b/lib/CodeGen/ELFWriter.cpp
index e62079f947..ffbaf6ba92 100644
--- a/lib/CodeGen/ELFWriter.cpp
+++ b/lib/CodeGen/ELFWriter.cpp
@@ -356,7 +356,7 @@ void ELFWriter::EmitGlobal(const GlobalValue *GV) {
unsigned Size = TD->getTypeAllocSize(GVar->getInitializer()->getType());
GblSym->Size = Size;
- if (S->IsCommon()) { // Symbol must go to a common section
+ if (S->HasCommonSymbols()) { // Symbol must go to a common section
GblSym->SectionIdx = ELFSection::SHN_COMMON;
// A new linkonce section is created for each global in the
diff --git a/lib/MC/MCSectionELF.cpp b/lib/MC/MCSectionELF.cpp
index 246bf4adac..3d8774ceeb 100644
--- a/lib/MC/MCSectionELF.cpp
+++ b/lib/MC/MCSectionELF.cpp
@@ -122,8 +122,10 @@ void MCSectionELF::PrintSwitchToSection(const TargetAsmInfo &TAI,
OS << '\n';
}
-// IsCommon - True if this section contains only common symbols
-bool MCSectionELF::IsCommon() const {
+// HasCommonSymbols - True if this section holds common symbols, this is
+// indicated on the ELF object file by a symbol with SHN_COMMON section
+// header index.
+bool MCSectionELF::HasCommonSymbols() const {
if (strncmp(SectionName.c_str(), ".gnu.linkonce.", 14) == 0)
return true;