Don't leave pointers uninitialized in the default constructor. GCC complains
authorChandler Carruth <chandlerc@gmail.com>
Sun, 13 Dec 2009 07:04:45 +0000 (07:04 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 13 Dec 2009 07:04:45 +0000 (07:04 +0000)
about the potential use of these uninitialized members under certain conditions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91239 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/PromoteMemoryToRegister.cpp

index e25f9e2a999a02f912df9adfb6ed1e93e273ca8f..438ac43bcbaeb0660b0c704251075140d85cc1fa 100644 (file)
@@ -102,7 +102,7 @@ namespace {
   public:
     typedef std::vector<Value *> ValVector;
     
-    RenamePassData() {}
+    RenamePassData() : BB(NULL), Pred(NULL), Values() {}
     RenamePassData(BasicBlock *B, BasicBlock *P,
                    const ValVector &V) : BB(B), Pred(P), Values(V) {}
     BasicBlock *BB;