|
@@ -112,6 +112,7 @@ class ASTLabel {
|
|
|
public:
|
|
public:
|
|
|
ASTLabel(u32 index) : index{index} {}
|
|
ASTLabel(u32 index) : index{index} {}
|
|
|
u32 index;
|
|
u32 index;
|
|
|
|
|
+ bool unused{};
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
class ASTGoto {
|
|
class ASTGoto {
|
|
@@ -204,6 +205,13 @@ public:
|
|
|
return nullptr;
|
|
return nullptr;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ void MarkLabelUnused() const {
|
|
|
|
|
+ auto inner = std::get_if<ASTLabel>(&data);
|
|
|
|
|
+ if (inner) {
|
|
|
|
|
+ inner->unused = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
Expr GetIfCondition() const {
|
|
Expr GetIfCondition() const {
|
|
|
auto inner = std::get_if<ASTIfThen>(&data);
|
|
auto inner = std::get_if<ASTIfThen>(&data);
|
|
|
if (inner) {
|
|
if (inner) {
|