From ed3e3ee9e30dfbffd2170a770a49b36a7f444916 Mon Sep 17 00:00:00 2001 From: Vasileios Porpodas Date: Wed, 8 Feb 2023 10:13:01 -0800 Subject: [NFC][IR] Make Module::getGlobalList() private This patch adds several missing GlobalList modifier functions, like removeGlobalVariable(), eraseGlobalVariable() and insertGlobalVariable(). There is no longer need to access the list directly so it also makes getGlobalList() private. Differential Revision: https://reviews.llvm.org/D144027 --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp') diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index ef9a486..35607df 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -3693,7 +3693,7 @@ Error BitcodeReader::globalCleanup() { UpgradedVariables.emplace_back(&GV, Upgraded); for (auto &Pair : UpgradedVariables) { Pair.first->eraseFromParent(); - TheModule->getGlobalList().push_back(Pair.second); + TheModule->insertGlobalVariable(Pair.second); } // Force deallocation of memory for these vectors to favor the client that -- cgit v1.1