sink the 'name' and 'isdirective' state out of MCSection into its derived classes.
This totally optimizes PIC16 sections by not having an 'isdirective' bit anymore!! ;-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78517 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/PIC16/PIC16TargetObjectFile.h b/lib/Target/PIC16/PIC16TargetObjectFile.h
index f8389a6..edd2b1c 100644
--- a/lib/Target/PIC16/PIC16TargetObjectFile.h
+++ b/lib/Target/PIC16/PIC16TargetObjectFile.h
@@ -17,6 +17,7 @@
class GlobalVariable;
class Module;
class PIC16TargetMachine;
+ class MCSectionPIC16;
enum { DataBankSize = 80 };
@@ -29,12 +30,12 @@
/// FIXME: MOVE ALL THIS STUFF TO MCSectionPIC16.
///
struct PIC16Section {
- const MCSection *S_; // Connection to actual Section.
+ const MCSectionPIC16 *S_; // Connection to actual Section.
unsigned Size; // Total size of the objects contained.
bool SectionPrinted;
std::vector<const GlobalVariable*> Items;
- PIC16Section(const MCSection *s) {
+ PIC16Section(const MCSectionPIC16 *s) {
S_ = s;
Size = 0;
SectionPrinted = false;
@@ -46,8 +47,8 @@
class PIC16TargetObjectFile : public TargetLoweringObjectFile {
const TargetMachine *TM;
- const MCSection *getPIC16Section(const char *Name, bool isDirective,
- SectionKind K) const;
+ const MCSectionPIC16 *getPIC16Section(const char *Name,
+ SectionKind K) const;
public:
mutable std::vector<PIC16Section*> BSSSections;
mutable std::vector<PIC16Section*> IDATASections;