- Fix bug in LoopInfo causing ParentLoop to be garbage

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3940 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-09-26 16:15:19 +00:00
parent d74472ed21
commit de39b71455

View File

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