Fix a small regression impacting MSVC debug builds (#285)

* decomp: Fix nonempty_intersection impl for MSVC Debugging use-case

* docs: Add info on getting ASan builds running on Visual Studio w/o exceptions
This commit is contained in:
Tyler Wilding
2021-02-27 10:38:04 -08:00
committed by GitHub
parent b7f040986e
commit 049489c85b
2 changed files with 15 additions and 5 deletions
+7 -5
View File
@@ -110,10 +110,12 @@ Form* FormStack::pop_reg(const Variable& var,
namespace {
bool nonempty_intersection(const RegSet& a, const RegSet& b) {
// todo - if we ever switch to bit reg sets, this could be a lot faster.
std::vector<Register> isect;
std::set_intersection(a.begin(), a.end(), b.begin(), b.end(), std::back_inserter(isect));
return !isect.empty();
for (auto x : a) {
if (b.find(x) != b.end()) {
return true;
}
}
return false;
}
} // namespace
@@ -378,4 +380,4 @@ std::vector<FormElement*> rewrite_to_get_var(FormStack& stack,
return default_result;
}
} // namespace decompiler
} // namespace decompiler