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)
commitc9c277ba0fa0b30949f2bb49eb1e2894b87a08ba
treebaca8808c217e3674dcf9b9b558a2e32088d4fac
parente480ce3d2916c2282cc3409b7e3534d265676927
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.

llvm-svn: 77803
llvm/include/llvm/MC/MCSection.h
llvm/include/llvm/Target/TargetLoweringObjectFile.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/CodeGen/ELFWriter.cpp
llvm/lib/MC/MCSection.cpp
llvm/lib/Target/Alpha/AlphaISelLowering.cpp
llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp
llvm/lib/Target/PIC16/PIC16TargetObjectFile.cpp
llvm/lib/Target/PIC16/PIC16TargetObjectFile.h
llvm/lib/Target/TargetLoweringObjectFile.cpp
llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp