[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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user