summaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2023-01-16 11:00:01 -0500
committerMatt Arsenault <arsenm2@gmail.com>2023-01-19 21:35:26 -0400
commit23cc36e4765912a1bcdbbc3fb8b0976a06dea043 (patch)
tree0da90d1957a255c609a69050f8f5c999056a336c /llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp
parent60834105d85cba27e1e1b2b4ecf4cd658019d867 (diff)
downloadllvm-23cc36e4765912a1bcdbbc3fb8b0976a06dea043.tar.gz
llvm-reduce: Use consistent ReductionFunc types
Some of these were relying on ReducerWorkItem's operator Module&.
Diffstat (limited to 'llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp')
-rw-r--r--llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp b/llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp
index 9765b38d9ce4..4c7125217f25 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp
@@ -18,9 +18,9 @@
using namespace llvm;
/// Removes all the Initialized GVs that aren't inside the desired Chunks.
-static void extractGVsFromModule(Oracle &O, Module &Program) {
+static void extractGVsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
// Drop initializers of out-of-chunk GVs
- for (auto &GV : Program.globals())
+ for (auto &GV : WorkItem.getModule().globals())
if (GV.hasInitializer() && !O.shouldKeep()) {
GV.setInitializer(nullptr);
GV.setLinkage(GlobalValue::LinkageTypes::ExternalLinkage);