aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
diff options
context:
space:
mode:
authorVasileios Porpodas <vporpodas@google.com>2023-02-08 10:13:01 -0800
committerVasileios Porpodas <vporpodas@google.com>2023-02-14 14:25:10 -0800
commited3e3ee9e30dfbffd2170a770a49b36a7f444916 (patch)
tree6275f64f87d50bc50565ffe3e4d43ff1716691bc /llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
parent33d0d1e36ffac3ff7fb29e5f8e34a6b6957ad8e9 (diff)
downloadllvm-ed3e3ee9e30dfbffd2170a770a49b36a7f444916.zip
llvm-ed3e3ee9e30dfbffd2170a770a49b36a7f444916.tar.gz
llvm-ed3e3ee9e30dfbffd2170a770a49b36a7f444916.tar.bz2
[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
Diffstat (limited to 'llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
index 080ee76..7410b37 100644
--- a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
+++ b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
@@ -958,7 +958,7 @@ void DevirtModule::buildTypeIdentifierMap(
std::vector<VTableBits> &Bits,
DenseMap<Metadata *, std::set<TypeMemberInfo>> &TypeIdMap) {
DenseMap<GlobalVariable *, VTableBits *> GVToBits;
- Bits.reserve(M.getGlobalList().size());
+ Bits.reserve(M.global_size());
SmallVector<MDNode *, 2> Types;
for (GlobalVariable &GV : M.globals()) {
Types.clear();