| 1200 | m_currentFunction = ""; |
| 1201 | } |
| 1202 | void HLSLCompiler::translateReturnStatement(M4::HLSLReturnStatement* ret) |
| 1203 | { |
| 1204 | if (ret->expression != NULL) { |
| 1205 | translateExpression(ret->expression); |
| 1206 | |
| 1207 | if (!m_isImmediate) { |
| 1208 | HLSLCompiler::ExpressionType rType = m_convertType(m_curFuncData->ReturnType); |
| 1209 | HLSLCompiler::ExpressionType expType = m_convertType(ret->expression->expressionType); |
| 1210 | |
| 1211 | if (rType != expType) |
| 1212 | m_generateConvert(rType); |
| 1213 | } |
| 1214 | } |
| 1215 | |
| 1216 | m_gen.Function.Return(); |
| 1217 | } |
| 1218 | void HLSLCompiler::translateBreakStatement(M4::HLSLBreakStatement* brk) |
| 1219 | { |
| 1220 | if (m_breaks.size() > 0) |
nothing calls this directly
no outgoing calls
no test coverage detected