aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-02 01:25:15 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-02 01:25:15 +0000
commit967ce7f5e1239be52386afa0439d2c433809aeeb (patch)
treea8ad72b3d8d4a3b62cf9c563d183504129880ed6
parent6f69aa356136ada3d414d04cfab4341e87b63165 (diff)
Fix a possible crash on delete of an uninitialized variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77846 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/PIC16/PIC16TargetObjectFile.cpp5
-rw-r--r--lib/Target/PIC16/PIC16TargetObjectFile.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/Target/PIC16/PIC16TargetObjectFile.cpp b/lib/Target/PIC16/PIC16TargetObjectFile.cpp
index f287456743..7b5d5574e5 100644
--- a/lib/Target/PIC16/PIC16TargetObjectFile.cpp
+++ b/lib/Target/PIC16/PIC16TargetObjectFile.cpp
@@ -15,6 +15,11 @@
#include "llvm/MC/MCSection.h"
using namespace llvm;
+PIC16TargetObjectFile::PIC16TargetObjectFile()
+ : ExternalVarDecls(0), ExternalVarDefs(0)
+{
+}
+
void PIC16TargetObjectFile::Initialize(MCContext &Ctx, const TargetMachine &tm){
TargetLoweringObjectFile::Initialize(Ctx, tm);
TM = &tm;
diff --git a/lib/Target/PIC16/PIC16TargetObjectFile.h b/lib/Target/PIC16/PIC16TargetObjectFile.h
index c296954dce..708c311e28 100644
--- a/lib/Target/PIC16/PIC16TargetObjectFile.h
+++ b/lib/Target/PIC16/PIC16TargetObjectFile.h
@@ -52,7 +52,8 @@ namespace llvm {
mutable std::vector<PIC16Section*> ROSections;
mutable PIC16Section *ExternalVarDecls;
mutable PIC16Section *ExternalVarDefs;
-
+
+ PIC16TargetObjectFile();
~PIC16TargetObjectFile();
void Initialize(MCContext &Ctx, const TargetMachine &TM);