Recommit: [NFC][IR] Make Module::getGlobalList() private

This reverts commit cb5f239363.
This commit is contained in:
Vasileios Porpodas
2023-02-14 14:33:20 -08:00
parent 0a0d58f546
commit 823186b14d
15 changed files with 82 additions and 28 deletions

View File

@@ -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