diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-06 16:27:28 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-06 16:27:28 +0000 |
commit | b29996eb238cc2a23fbfadf3f02cce83d74ccc5d (patch) | |
tree | b3ff6728f015aa9f3cd9f63b48b7e8f33f2d7bcb /llvm/lib/Target/PIC16/PIC16TargetObjectFile.cpp | |
parent | 15acfb9f501e047fb3791d8e3a2f2582541d3991 (diff) | |
download | bcm5719-llvm-b29996eb238cc2a23fbfadf3f02cce83d74ccc5d.tar.gz bcm5719-llvm-b29996eb238cc2a23fbfadf3f02cce83d74ccc5d.zip |
go through PIC16TargetObjectFile to make sections instead of
creating them directly in the pic16 asmprinter.
llvm-svn: 78317
Diffstat (limited to 'llvm/lib/Target/PIC16/PIC16TargetObjectFile.cpp')
-rw-r--r-- | llvm/lib/Target/PIC16/PIC16TargetObjectFile.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/llvm/lib/Target/PIC16/PIC16TargetObjectFile.cpp b/llvm/lib/Target/PIC16/PIC16TargetObjectFile.cpp index 7b5d5574e5c..f15f3321c7c 100644 --- a/llvm/lib/Target/PIC16/PIC16TargetObjectFile.cpp +++ b/llvm/lib/Target/PIC16/PIC16TargetObjectFile.cpp @@ -16,8 +16,7 @@ using namespace llvm; PIC16TargetObjectFile::PIC16TargetObjectFile() - : ExternalVarDecls(0), ExternalVarDefs(0) -{ + : ExternalVarDecls(0), ExternalVarDefs(0) { } void PIC16TargetObjectFile::Initialize(MCContext &Ctx, const TargetMachine &tm){ @@ -47,6 +46,18 @@ void PIC16TargetObjectFile::Initialize(MCContext &Ctx, const TargetMachine &tm){ SectionKind::getMetadata())); } +const MCSection *PIC16TargetObjectFile:: +getSectionForFunction(const std::string &FnName) const { + std::string T = PAN::getCodeSectionName(FnName); + return getOrCreateSection(T.c_str(), false, SectionKind::getText()); +} + + +const MCSection *PIC16TargetObjectFile:: +getSectionForFunctionFrame(const std::string &FnName) const { + std::string T = PAN::getFrameSectionName(FnName); + return getOrCreateSection(T.c_str(), false, SectionKind::getDataRel()); +} const MCSection * PIC16TargetObjectFile::getBSSSectionForGlobal(const GlobalVariable *GV) const { |