diff options
-rw-r--r-- | include/llvm/Analysis/LoopInfo.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index 4e572c7e77..6c531ac03d 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -69,7 +69,9 @@ public: void print(std::ostream &O) const; private: friend class LoopInfo; - inline Loop(BasicBlock *BB) { Blocks.push_back(BB); LoopDepth = 0; } + inline Loop(BasicBlock *BB) : ParentLoop(0) { + Blocks.push_back(BB); LoopDepth = 0; + } ~Loop() { for (unsigned i = 0, e = SubLoops.size(); i != e; ++i) delete SubLoops[i]; |