diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2019-01-28 14:21:21 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-28 14:21:21 -0800 |
| commit | adb3e222393a780de41f258bd273fa3231db10c0 (patch) | |
| tree | 1d39bbf22e31dbc0e1d3861258dbcbbeb0dc3bc6 /source/slang/ir.h | |
| parent | 3b9573af2c1c898eb8c5b98b6d29cd3889579a51 (diff) | |
| parent | 3c3513ab501277333d1062ad2737ac4a60dac6f7 (diff) | |
Merge branch 'master' into yong-fix2
Diffstat (limited to 'source/slang/ir.h')
| -rw-r--r-- | source/slang/ir.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/slang/ir.h b/source/slang/ir.h index e62bb2249..343f5b79b 100644 --- a/source/slang/ir.h +++ b/source/slang/ir.h @@ -952,7 +952,15 @@ struct IRStructKey : IRInst struct IRStructField : IRInst { IRStructKey* getKey() { return cast<IRStructKey>(getOperand(0)); } - IRType* getFieldType() { return cast<IRType>(getOperand(1)); } + IRType* getFieldType() + { + // Note: We do not use `cast` here because there are + // cases of types (which we would like to conveniently + // refer to via an `IRType*`) which do not actually + // inherit from `IRType` in the hierarchy. + // + return (IRType*) getOperand(1); + } IR_LEAF_ISA(StructField) }; |
