verification_pass: show type errors

This commit is contained in:
Tillmann Karras 2016-08-17 13:29:05 +01:00 committed by MerryMage
parent dad7724b86
commit 9782e7da3f
4 changed files with 35 additions and 13 deletions

View file

@ -4,6 +4,7 @@
* General Public License version 2 or any later version.
*/
#include <array>
#include <map>
#include <vector>
@ -48,5 +49,12 @@ const char* GetNameOf(Opcode op) {
return OpcodeInfo::opcode_info.at(op).name;
}
const char* GetNameOf(Type type) {
const static std::array<const char*, 11> names = {
"Void", "RegRef", "ExtRegRef", "Opaque", "U1", "U8", "U16", "U32", "U64", "F32", "F64"
};
return names.at(static_cast<size_t>(type));
}
} // namespace IR
} // namespace Dynarmic