Comments in header
| 2914 | |
| 2915 | // Comments in header |
| 2916 | void Builder::leaveFunction() |
| 2917 | { |
| 2918 | Block* block = buildPoint; |
| 2919 | Function& function = buildPoint->getParent(); |
| 2920 | assert(block); |
| 2921 | |
| 2922 | // If our function did not contain a return, add a return void now. |
| 2923 | if (! block->isTerminated()) { |
| 2924 | if (function.getReturnType() == makeVoidType()) |
| 2925 | makeReturn(true); |
| 2926 | else { |
| 2927 | makeReturn(true, createUndefined(function.getReturnType())); |
| 2928 | } |
| 2929 | } |
| 2930 | |
| 2931 | // Clear function scope from debug scope stack |
| 2932 | if (emitNonSemanticShaderDebugInfo) |
| 2933 | currentDebugScopeId.pop(); |
| 2934 | |
| 2935 | emitNonSemanticShaderDebugInfo = restoreNonSemanticShaderDebugInfo; |
| 2936 | |
| 2937 | // Clear current function record |
| 2938 | currentFunction = nullptr; |
| 2939 | } |
| 2940 | |
| 2941 | // Comments in header |
| 2942 | void Builder::makeStatementTerminator(spv::Op opcode, const char *name) |
no test coverage detected