*try* to use a better name to describe how common symbols are marked on the elf objec...
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Fri, 14 Aug 2009 19:45:38 +0000 (19:45 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Fri, 14 Aug 2009 19:45:38 +0000 (19:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79029 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCSectionELF.h
lib/CodeGen/ELFWriter.cpp
lib/MC/MCSectionELF.cpp

index 8d23b285f3e98c5bdf05bcb24420779921fbe144..1c2943a90973893df135a9a8a08f3d6ffb9fbcfe 100644 (file)
@@ -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.
index e62079f9472a12a065c419a6bad1d03b16673e88..ffbaf6ba9252e059c3df6c9029833dbf7f65396b 100644 (file)
@@ -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
index 246bf4adac8fc3e6cdda15eddda00b48d7f38f9b..3d8774ceeb27604b0d7ccc9e4f784c515544d71e 100644 (file)
@@ -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;