diff options
Diffstat (limited to 'clang/lib/AST/ByteCode/Program.cpp')
-rw-r--r-- | clang/lib/AST/ByteCode/Program.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/AST/ByteCode/Program.cpp b/clang/lib/AST/ByteCode/Program.cpp index 75bfd9f..e653782 100644 --- a/clang/lib/AST/ByteCode/Program.cpp +++ b/clang/lib/AST/ByteCode/Program.cpp @@ -226,11 +226,7 @@ UnsignedOrNone Program::createGlobal(const ValueDecl *VD, const Expr *Init) { Globals[PIdx] = NewGlobal; // All pointers pointing to the previous extern decl now point to the // new decl. - for (Pointer *Ptr = RedeclBlock->Pointers; Ptr; Ptr = Ptr->BS.Next) { - RedeclBlock->removePointer(Ptr); - Ptr->BS.Pointee = NewGlobal->block(); - NewGlobal->block()->addPointer(Ptr); - } + RedeclBlock->movePointersTo(NewGlobal->block()); } } PIdx = *Idx; |