Unconditionally define the RValue copy constructor
Previously we relied on the default copy constructor to be generated
when ENABLE_RR_DEBUG_INFO is disabled. This is not necessary as we can
just use the straightforward manual definition of it in either case.
Note RR_DEBUG_INFO_EMIT_VAR() is a no-op when ENABLE_RR_DEBUG_INFO is
disabled.
Bug: b/155302798
Change-Id: I04c020a795b4333e3c3d0a7ed375d21d9382e3d1
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/45152
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
diff --git a/src/Reactor/Reactor.hpp b/src/Reactor/Reactor.hpp
index 2cef4df..83e4a64 100644
--- a/src/Reactor/Reactor.hpp
+++ b/src/Reactor/Reactor.hpp
@@ -247,10 +247,7 @@
explicit RValue(Value *rvalue);
-#ifdef ENABLE_RR_DEBUG_INFO
RValue(const RValue<T> &rvalue);
-#endif // ENABLE_RR_DEBUG_INFO
-
RValue(const T &lvalue);
RValue(typename BoolLiteral<T>::type i);
RValue(typename IntLiteral<T>::type i);
@@ -2737,14 +2734,12 @@
return alignment;
}
-#ifdef ENABLE_RR_DEBUG_INFO
template<class T>
RValue<T>::RValue(const RValue<T> &rvalue)
: val(rvalue.val)
{
RR_DEBUG_INFO_EMIT_VAR(val);
}
-#endif // ENABLE_RR_DEBUG_INFO
template<class T>
RValue<T>::RValue(Value *value)