MCPcopy Create free account
hub / github.com/dfranx/ShaderDebugger / translateTernary

Method translateTernary

src/HLSLCompiler.cpp:844–856  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

842 }
843 }
844 void HLSLCompiler::translateTernary(M4::HLSLConditionalExpression* expr)
845 {
846 translateExpression(expr->condition);
847 size_t pos = m_gen.Function.If();
848 // ?
849 translateExpression(expr->trueExpression);
850 size_t goto_skip = m_gen.Function.Goto();
851 // :
852 m_gen.Function.SetAddress(pos, m_gen.Function.GetCurrentAddress());
853 translateExpression(expr->falseExpression);
854
855 m_gen.Function.SetAddress(goto_skip, m_gen.Function.GetCurrentAddress());
856 }
857 void HLSLCompiler::translateMemberAccess(M4::HLSLMemberAccess* expr)
858 {
859 bool temp_isSet = m_isSet, temp_usePointer = m_usePointer;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected