Fixed an RSoV LIT regression under debug build
Currently we have a test case (errors/unsupported_type.ll) to catch
unsupported types in RSoV. That test expects certain error messages
reported by RSoV, but with the assertions the desirable error reporting
path will never be reached.
This problem does not show up in release build because assert() becomes
NOP there.
Test: RSoV LIT
Change-Id: I5aa3a81126068b46af819352a3ff0c4402acafc8
diff --git a/rsov/compiler/ReflectionPass.cpp b/rsov/compiler/ReflectionPass.cpp
index 995c0a5..a422a14 100644
--- a/rsov/compiler/ReflectionPass.cpp
+++ b/rsov/compiler/ReflectionPass.cpp
@@ -71,8 +71,8 @@
return "int";
else if (IT->getBitWidth() == 8)
return "uchar";
- assert(false && "Unknown integer type");
}
+
if (Ty->isFloatTy())
return "float";
@@ -83,17 +83,11 @@
return "int4";
else if (IT->getBitWidth() == 8)
return "uchar4";
-
- assert(false && "Unknown integer vector type");
}
if (ET->isFloatTy())
return "float4";
-
- assert(false && "Unknown vector type");
}
- assert(false && "Unknown type");
-
std::string badNameString;
raw_string_ostream badNameStream(badNameString);
badNameStream << '[';