Skip to content

Commit

Permalink
fix example test
Browse files Browse the repository at this point in the history
  • Loading branch information
tlively committed Sep 17, 2024
1 parent a1fdb4e commit 7a00f39
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/example/module-splitting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void do_test(const std::set<Name>& keptFuncs, std::string&& module) {
assert(valid && "before invalid!");

std::set<Name> splitFuncs;
for (auto& func : primary.functions) {
for (auto& func : primary->functions) {
splitFuncs.insert(func->name);
}

Expand Down Expand Up @@ -450,7 +450,6 @@ void test_minimized_exports() {
Module primary;
primary.features = FeatureSet::All;

std::set<Name> keep;
Expression* callBody = nullptr;

Builder builder(primary);
Expand All @@ -460,7 +459,6 @@ void test_minimized_exports() {
Name name = std::to_string(i);
primary.addFunction(
Builder::makeFunction(name, funcType, {}, builder.makeNop()));
keep.insert(name);
callBody =
builder.blockify(callBody, builder.makeCall(name, {}, Type::none));

Expand All @@ -477,7 +475,7 @@ void test_minimized_exports() {
primary.addFunction(Builder::makeFunction("call", funcType, {}, callBody));

ModuleSplitting::Config config;
config.primaryFuncs = std::move(keep);
config.secondaryFuncs = {"call"};
config.newExportPrefix = "%";
config.minimizeNewExportNames = true;

Expand Down

0 comments on commit 7a00f39

Please sign in to comment.