Commit c958b171 by Ben Clayton

LLVMReactor: Assert return value type matches function sig.

Bug: b/131914569 Change-Id: I228c8812a49ce3333227e1463c7617f942088a4f Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30454 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com>
parent 60a6a2e7
......@@ -1080,6 +1080,8 @@ namespace rr
{
RR_DEBUG_INFO_UPDATE_LOC();
ASSERT_MSG(::function->getReturnType() == T(Void::getType()), "Return type mismatch");
// Code generated after this point is unreachable, so any variables
// being read can safely return an undefined value. We have to avoid
// materializing variables after the terminator ret instruction.
......@@ -1092,6 +1094,8 @@ namespace rr
{
RR_DEBUG_INFO_UPDATE_LOC();
ASSERT_MSG(::function->getReturnType() == V(v)->getType(), "Return type mismatch");
// Code generated after this point is unreachable, so any variables
// being read can safely return an undefined value. We have to avoid
// materializing variables after the terminator ret instruction.
......
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