- Fix bug in LoopInfo causing ParentLoop to be garbage

llvm-svn: 3940
This commit is contained in:
Chris Lattner 2002-09-26 16:15:19 +00:00
parent 8752bb1cfc
commit 51dd965704

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