Handle binaries without unwinding data
This commit is contained in:
parent
382914d193
commit
574750681c
1 changed files with 8 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <iostream>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
FactoredSwitchCompiler::FactoredSwitchCompiler(int indent):
|
FactoredSwitchCompiler::FactoredSwitchCompiler(int indent):
|
||||||
|
@ -12,6 +13,13 @@ FactoredSwitchCompiler::FactoredSwitchCompiler(int indent):
|
||||||
void FactoredSwitchCompiler::to_stream(
|
void FactoredSwitchCompiler::to_stream(
|
||||||
std::ostream& os, const SwitchStatement& sw)
|
std::ostream& os, const SwitchStatement& sw)
|
||||||
{
|
{
|
||||||
|
if(sw.cases.empty()) {
|
||||||
|
std::cerr << "WARNING: empty unwinding data!\n";
|
||||||
|
os
|
||||||
|
<< indent_str("/* WARNING: empty unwinding data! */\n")
|
||||||
|
<< indent_str(sw.default_case) << "\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
JumpPointMap jump_points;
|
JumpPointMap jump_points;
|
||||||
|
|
||||||
gen_binsearch_tree(os, jump_points, sw.switch_var,
|
gen_binsearch_tree(os, jump_points, sw.switch_var,
|
||||||
|
|
Loading…
Reference in a new issue