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.
Details
Details
- Reviewers
aeubanks - Commits
- rGed3e3ee9e30d: [NFC][IR] Make Module::getGlobalList() private
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/unittests/IR/ModuleTest.cpp | ||
---|---|---|
48–49 | can just delete the commented out lines and add the reasoning behind deleting this either as a phabricator comment or in the commit description |
llvm/unittests/IR/ModuleTest.cpp | ||
---|---|---|
47–49 | I removed this because it is testing whether ilist.sort() works, which is not Module-specific. This requires access to the full GlobalList for no real reason. |
Comment Actions
This seems to have broken our buildbot: https://lab.llvm.org/buildbot/#/builders/169/builds/16797/steps/8/logs/stdio
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /b/sanitizer-x86_64-linux-qemu/build/llvm_build0/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D_LIBCPP_ENABLE_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/lib/Transforms/IPO -I/b/sanitizer-x86_64-linux-qemu/build/llvm-project/llvm/lib/Transforms/IPO -I/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_host/include -I/b/sanitizer-x86_64-linux-qemu/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fno-exceptions -fno-rtti -UNDEBUG -std=c++17 -MD -MT lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/SCCP.cpp.o -MF lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/SCCP.cpp.o.d -o lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/SCCP.cpp.o -c /b/sanitizer-x86_64-linux-qemu/build/llvm-project/llvm/lib/Transforms/IPO/SCCP.cpp /b/sanitizer-x86_64-linux-qemu/build/llvm-project/llvm/lib/Transforms/IPO/SCCP.cpp:478:19: error: out-of-line definition of 'createIPSCCPPass' does not match any declaration in namespace 'llvm' ModulePass *llvm::createIPSCCPPass() { return new IPSCCPLegacyPass(); } ^~~~~~~~~~~~~~~~ 1 error generated.
Comment Actions
Yeah sorry about that, I reverted it here: b5f239363a3 Revert "[NFC][IR] Make Module::getGlobalList() private"
I removed this because it is testing whether ilist.sort() works, which is not Module-specific. This requires access to the full GlobalList for no real reason.