fix a really bad bug that would cause nested cursors to break,
authorChris Lattner <sabre@nondot.org>
Sat, 9 Jul 2011 17:00:12 +0000 (17:00 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 9 Jul 2011 17:00:12 +0000 (17:00 +0000)
used by the new bitcode reader.

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

include/llvm/Bitcode/BitstreamReader.h

index 0ca3ad1561880448c8b2d17f1430d2b499e29333..0437f53134dc6cbc237c512467f2a57f0b6c4048 100644 (file)
@@ -194,6 +194,7 @@ public:
       CurAbbrevs[i]->addRef();
     
     // Copy block scope and bump ref counts.
+    BlockScope = RHS.BlockScope;
     for (unsigned S = 0, e = static_cast<unsigned>(BlockScope.size());
          S != e; ++S) {
       std::vector<BitCodeAbbrev*> &Abbrevs = BlockScope[S].PrevAbbrevs;