aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/rtlil.cc3
-rw-r--r--kernel/rtlil.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc
index 6f5082138..5d992ef2d 100644
--- a/kernel/rtlil.cc
+++ b/kernel/rtlil.cc
@@ -3297,7 +3297,7 @@ void RTLIL::SigSpec::replace(int offset, const RTLIL::SigSpec &with)
check();
}
-void RTLIL::SigSpec::remove_const()
+RTLIL::SigSpec& RTLIL::SigSpec::remove_const()
{
if (packed())
{
@@ -3331,6 +3331,7 @@ void RTLIL::SigSpec::remove_const()
}
check();
+ return *this;
}
void RTLIL::SigSpec::remove(int offset, int length)
diff --git a/kernel/rtlil.h b/kernel/rtlil.h
index 8d88cc97c..b484f5306 100644
--- a/kernel/rtlil.h
+++ b/kernel/rtlil.h
@@ -767,7 +767,7 @@ public:
void remove2(const std::set<RTLIL::SigBit> &pattern, RTLIL::SigSpec *other);
void remove(int offset, int length = 1);
- void remove_const();
+ RTLIL::SigSpec& remove_const();
RTLIL::SigSpec extract(const RTLIL::SigSpec &pattern, const RTLIL::SigSpec *other = NULL) const;
RTLIL::SigSpec extract(const pool<RTLIL::SigBit> &pattern, const RTLIL::SigSpec *other = NULL) const;