mirror of
https://github.com/corda/corda.git
synced 2025-01-07 05:28:51 +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)
|
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);
|
Value* dst = value(&c, type);
|
||||||
appendMove(&c,
|
appendMove(&c,
|
||||||
lir::Move,
|
lir::Move,
|
||||||
|
Loading…
Reference in New Issue
Block a user