summaryrefslogtreecommitdiff
path: root/src/passes
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes')
-rw-r--r--src/passes/Print.cpp2
-rw-r--r--src/passes/Strip.cpp20
2 files changed, 11 insertions, 11 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp
index 6dbd54e73..d4b86f93d 100644
--- a/src/passes/Print.cpp
+++ b/src/passes/Print.cpp
@@ -3370,7 +3370,7 @@ struct PrintSExpression : public UnifiedExpressionVisitor<PrintSExpression> {
if (curr->dylinkSection) {
printDylinkSection(curr->dylinkSection);
}
- for (auto& section : curr->userSections) {
+ for (auto& section : curr->customSections) {
doIndent(o, indent);
o << ";; custom section \"" << section.name << "\", size "
<< section.data.size();
diff --git a/src/passes/Strip.cpp b/src/passes/Strip.cpp
index fe3476202..19bc099de 100644
--- a/src/passes/Strip.cpp
+++ b/src/passes/Strip.cpp
@@ -31,19 +31,19 @@ struct Strip : public Pass {
bool requiresNonNullableLocalFixups() override { return false; }
// A function that returns true if the method should be removed.
- using Decider = std::function<bool(UserSection&)>;
+ using Decider = std::function<bool(CustomSection&)>;
Decider decider;
Strip(Decider decider) : decider(decider) {}
void run(Module* module) override {
// Remove name and debug sections.
- auto& sections = module->userSections;
+ auto& sections = module->customSections;
sections.erase(std::remove_if(sections.begin(), sections.end(), decider),
sections.end());
// If we're cleaning up debug info, clear on the function and module too.
- UserSection temp;
- temp.name = BinaryConsts::UserSections::Name;
+ CustomSection temp;
+ temp.name = BinaryConsts::CustomSections::Name;
if (decider(temp)) {
module->clearDebugInfo();
for (auto& func : module->functions) {
@@ -55,22 +55,22 @@ struct Strip : public Pass {
};
Pass* createStripDebugPass() {
- return new Strip([&](const UserSection& curr) {
- return curr.name == BinaryConsts::UserSections::Name ||
- curr.name == BinaryConsts::UserSections::SourceMapUrl ||
+ return new Strip([&](const CustomSection& curr) {
+ return curr.name == BinaryConsts::CustomSections::Name ||
+ curr.name == BinaryConsts::CustomSections::SourceMapUrl ||
curr.name.find(".debug") == 0 || curr.name.find("reloc..debug") == 0;
});
}
Pass* createStripDWARFPass() {
- return new Strip([&](const UserSection& curr) {
+ return new Strip([&](const CustomSection& curr) {
return curr.name.find(".debug") == 0 || curr.name.find("reloc..debug") == 0;
});
}
Pass* createStripProducersPass() {
- return new Strip([&](const UserSection& curr) {
- return curr.name == BinaryConsts::UserSections::Producers;
+ return new Strip([&](const CustomSection& curr) {
+ return curr.name == BinaryConsts::CustomSections::Producers;
});
}