Change SectionKind to be a property that is true of a *section*, it
authorChris Lattner <sabre@nondot.org>
Sat, 1 Aug 2009 21:11:14 +0000 (21:11 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 1 Aug 2009 21:11:14 +0000 (21:11 +0000)
commit968ff1196768c0b6dbcc5508025a2923bfa73fab
treefade5e6230db537ea51173a1cbeb55d17b554c28
parentd7f10d33610fbf226e6e9425c534d0914fd012d4
Change SectionKind to be a property that is true of a *section*, it
should have no state that is specific to particular globals in the
section.  In this case, it means the removal of the "isWeak" and
"ExplicitSection" bits.  MCSection uses the new form of SectionKind.

To handle isWeak, I introduced a new SectionInfo class, which is
SectionKind + isWeak, and it is used by the part of the code generator
that does classification of a specific global.

The ExplicitSection disappears.  It is moved onto MCSection as a new
"IsDirective" bit.  Since the Name of a section is either a section
or directive, it makes sense to keep this bit in MCSection.  Ultimately
the creator of MCSection should canonicalize (e.g.) .text to whatever
the actual section is.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77803 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCSection.h
include/llvm/Target/TargetLoweringObjectFile.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/ELFWriter.cpp
lib/MC/MCSection.cpp
lib/Target/Alpha/AlphaISelLowering.cpp
lib/Target/PIC16/PIC16AsmPrinter.cpp
lib/Target/PIC16/PIC16TargetObjectFile.cpp
lib/Target/PIC16/PIC16TargetObjectFile.h
lib/Target/TargetLoweringObjectFile.cpp
lib/Target/XCore/XCoreTargetObjectFile.cpp