mirror of
https://github.com/corda/corda.git
synced 2025-01-05 20:54:13 +00:00
add type asserts in Compiler::truncate
This commit is contained in:
parent
b853f1a594
commit
3029bb2d7e
@ -2562,6 +2562,10 @@ class MyCompiler: public Compiler {
|
||||
|
||||
virtual ir::Value* truncate(ir::Type type, ir::Type srcType, ir::Value* src)
|
||||
{
|
||||
assert(&c, srcType == src->type);
|
||||
assert(&c, src->type.flavor() == type.flavor());
|
||||
assert(&c, type.flavor() != ir::Type::Float);
|
||||
assert(&c, type.size() < src->type.size());
|
||||
Value* dst = value(&c, type);
|
||||
appendMove(&c,
|
||||
lir::Move,
|
||||
|
Loading…
Reference in New Issue
Block a user