aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/PIC16/PIC16TargetObjectFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/PIC16/PIC16TargetObjectFile.cpp')
-rw-r--r--lib/Target/PIC16/PIC16TargetObjectFile.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Target/PIC16/PIC16TargetObjectFile.cpp b/lib/Target/PIC16/PIC16TargetObjectFile.cpp
index b09ad305c2..308e09c100 100644
--- a/lib/Target/PIC16/PIC16TargetObjectFile.cpp
+++ b/lib/Target/PIC16/PIC16TargetObjectFile.cpp
@@ -13,12 +13,21 @@
#include "llvm/DerivedTypes.h"
#include "llvm/Module.h"
#include "llvm/MC/MCSection.h"
+#include "llvm/MC/MCContext.h"
using namespace llvm;
PIC16TargetObjectFile::PIC16TargetObjectFile()
: ExternalVarDecls(0), ExternalVarDefs(0) {
}
+const MCSection *PIC16TargetObjectFile::
+getOrCreateSection(const char *Name, bool isDirective, SectionKind Kind) const {
+ if (MCSection *S = getContext().GetSection(Name))
+ return S;
+ return MCSection::Create(Name, isDirective, Kind, getContext());
+}
+
+
void PIC16TargetObjectFile::Initialize(MCContext &Ctx, const TargetMachine &tm){
TargetLoweringObjectFile::Initialize(Ctx, tm);
TM = &tm;