[llvm-commits] [llvm] r77846 - in /llvm/trunk/lib/Target/PIC16: PIC16TargetObjectFile.cpp PIC16TargetObjectFile.h
Daniel Dunbar
daniel at zuster.org
Sat Aug 1 18:25:15 PDT 2009
Author: ddunbar
Date: Sat Aug 1 20:25:15 2009
New Revision: 77846
URL: http://llvm.org/viewvc/llvm-project?rev=77846&view=rev
Log:
Fix a possible crash on delete of an uninitialized variable.
Modified:
llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.cpp
llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.h
Modified: llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.cpp?rev=77846&r1=77845&r2=77846&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.cpp (original)
+++ llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.cpp Sat Aug 1 20:25:15 2009
@@ -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;
Modified: llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.h?rev=77846&r1=77845&r2=77846&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.h (original)
+++ llvm/trunk/lib/Target/PIC16/PIC16TargetObjectFile.h Sat Aug 1 20:25:15 2009
@@ -52,7 +52,8 @@
mutable std::vector<PIC16Section*> ROSections;
mutable PIC16Section *ExternalVarDecls;
mutable PIC16Section *ExternalVarDefs;
-
+
+ PIC16TargetObjectFile();
~PIC16TargetObjectFile();
void Initialize(MCContext &Ctx, const TargetMachine &TM);
More information about the llvm-commits
mailing list