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
This commit is contained in:
Daniel Dunbar 2009-08-02 01:25:15 +00:00
parent 6f69aa3561
commit 967ce7f5e1
2 changed files with 7 additions and 1 deletions

View File

@ -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;

View File

@ -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);