aboutsummaryrefslogtreecommitdiff
path: root/gcc/analyzer
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/analyzer')
-rw-r--r--gcc/analyzer/region-model.cc5
-rw-r--r--gcc/analyzer/region-model.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/analyzer/region-model.cc b/gcc/analyzer/region-model.cc
index 06c0c86..9050b44 100644
--- a/gcc/analyzer/region-model.cc
+++ b/gcc/analyzer/region-model.cc
@@ -2192,7 +2192,10 @@ region_model::get_representative_path_var (const region *reg,
return path_var (function_reg->get_fndecl (), 0);
}
case RK_LABEL:
- gcc_unreachable (); // TODO
+ {
+ const label_region *label_reg = as_a <const label_region *> (reg);
+ return path_var (label_reg->get_label (), 0);
+ }
case RK_SYMBOLIC:
{
diff --git a/gcc/analyzer/region-model.h b/gcc/analyzer/region-model.h
index 5ad4a49..3298d05 100644
--- a/gcc/analyzer/region-model.h
+++ b/gcc/analyzer/region-model.h
@@ -1694,6 +1694,8 @@ public:
void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
enum region_kind get_kind () const FINAL OVERRIDE { return RK_LABEL; }
+ tree get_label () const { return m_label; }
+
private:
tree m_label;
};