summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mir/helpers.cpp5
-rw-r--r--src/mir/helpers.hpp1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/mir/helpers.cpp b/src/mir/helpers.cpp
index 02facac0..7b2fabd5 100644
--- a/src/mir/helpers.cpp
+++ b/src/mir/helpers.cpp
@@ -293,6 +293,11 @@ const ::HIR::TypeRef& ::MIR::TypeResolve::get_lvalue_type(::HIR::TypeRef& tmp, c
)
throw "";
}
+bool ::MIR::TypeResolve::lvalue_is_copy(const ::MIR::LValue& val) const
+{
+ ::HIR::TypeRef tmp;
+ return m_resolve.type_is_copy( this->sp, get_lvalue_type(tmp, val) );
+}
const ::HIR::TypeRef* ::MIR::TypeResolve::is_type_owned_box(const ::HIR::TypeRef& ty) const
{
return m_resolve.is_type_owned_box(ty);
diff --git a/src/mir/helpers.hpp b/src/mir/helpers.hpp
index 091a669f..f241753e 100644
--- a/src/mir/helpers.hpp
+++ b/src/mir/helpers.hpp
@@ -104,6 +104,7 @@ public:
::HIR::TypeRef get_const_type(const ::MIR::Constant& c) const;
+ bool lvalue_is_copy(const ::MIR::LValue& val) const;
const ::HIR::TypeRef* is_type_owned_box(const ::HIR::TypeRef& ty) const;
friend ::std::ostream& operator<<(::std::ostream& os, const TypeResolve& x) {