Commit 04e6b3b2 by Nicolas Capens Committed by Nicolas Capens

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: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com>
parent 3b655b65
......@@ -247,10 +247,7 @@ public:
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 @@ int Reference<T>::getAlignment() const
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment