summaryrefslogtreecommitdiff
path: root/lib/Target/PIC16/PIC16Section.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-08 23:39:42 +0000
committerChris Lattner <sabre@nondot.org>2009-08-08 23:39:42 +0000
commit93b6db3de934a3cfca5586df25184fef4a54c500 (patch)
tree3c32466a689b69726787f2b72bcdaf6a3879df50 /lib/Target/PIC16/PIC16Section.h
parent8e9ece75db5045ec057efbbdba6550fa0d85e695 (diff)
downloadllvm-93b6db3de934a3cfca5586df25184fef4a54c500.tar.gz
llvm-93b6db3de934a3cfca5586df25184fef4a54c500.tar.bz2
llvm-93b6db3de934a3cfca5586df25184fef4a54c500.tar.xz
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
Diffstat (limited to 'lib/Target/PIC16/PIC16Section.h')
-rw-r--r--lib/Target/PIC16/PIC16Section.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/Target/PIC16/PIC16Section.h b/lib/Target/PIC16/PIC16Section.h
index 4c2ae05707..f69cc2c807 100644
--- a/lib/Target/PIC16/PIC16Section.h
+++ b/lib/Target/PIC16/PIC16Section.h
@@ -15,27 +15,23 @@
#define LLVM_PIC16SECTION_H
#include "llvm/MC/MCSection.h"
-#include "llvm/MC/MCContext.h"
-#include "llvm/Support/raw_ostream.h"
namespace llvm {
class MCSectionPIC16 : public MCSection {
- MCSectionPIC16(const StringRef &Name, bool IsDirective, SectionKind K,
- MCContext &Ctx) : MCSection(Name, IsDirective, K, Ctx) {}
+ std::string Name;
+
+ MCSectionPIC16(const StringRef &name, SectionKind K,
+ MCContext &Ctx);
public:
- static MCSectionPIC16 *Create(const StringRef &Name, bool IsDirective,
- SectionKind K, MCContext &Ctx) {
- return new (Ctx) MCSectionPIC16(Name, IsDirective, K, Ctx);
- }
+ const std::string &getName() const { return Name; }
+ static MCSectionPIC16 *Create(const StringRef &Name,
+ SectionKind K, MCContext &Ctx);
virtual void PrintSwitchToSection(const TargetAsmInfo &TAI,
- raw_ostream &OS) const {
- OS << getName() << '\n';
- }
-
+ raw_ostream &OS) const;
};
} // end namespace llvm