OSDN Git Service

Initialize variable.
authorEric Christopher <echristo@apple.com>
Fri, 11 Nov 2011 03:16:32 +0000 (03:16 +0000)
committerEric Christopher <echristo@apple.com>
Fri, 11 Nov 2011 03:16:32 +0000 (03:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144360 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp

index 1e51709..159c096 100644 (file)
@@ -19,6 +19,7 @@
 #include "llvm/GlobalVariable.h"
 #include "llvm/Instructions.h"
 #include "llvm/Analysis/DIBuilder.h"
+#include "llvm/Support/Debug.h"
 #include "llvm/Target/Mangler.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/Target/TargetFrameLowering.h"
@@ -1095,7 +1096,7 @@ void CompileUnit::createGlobalVariableDIE(const MDNode *N) {
   addToContextOwner(VariableDIE, GVContext);
   // Add location.
   bool addToAccelTable = false;
-  DIE *VariableSpecDIE;
+  DIE *VariableSpecDIE = NULL;
   if (isGlobalVariable) {
     addToAccelTable = true;
     DIEBlock *Block = new (DIEValueAllocator) DIEBlock();