| 1951 | } |
| 1952 | |
| 1953 | void BeMCContext::SoftFail(const StringImpl& str, BeDbgLoc* dbgLoc) |
| 1954 | { |
| 1955 | if (mFailed) |
| 1956 | return; |
| 1957 | mFailed = true; |
| 1958 | |
| 1959 | String errStr = StrFormat("Failure during codegen of %s: %s", mBeFunction->mName.c_str(), str.c_str()); |
| 1960 | |
| 1961 | if (dbgLoc != NULL) |
| 1962 | { |
| 1963 | auto dbgFile = dbgLoc->GetDbgFile(); |
| 1964 | if (dbgFile != NULL) |
| 1965 | errStr += StrFormat(" at line %d:%d in %s/%s", dbgLoc->mLine + 1, dbgLoc->mColumn + 1, dbgFile->mDirectory.c_str(), dbgFile->mFileName.c_str()); |
| 1966 | } |
| 1967 | |
| 1968 | mModule->mBeIRCodeGen->Fail(errStr); |
| 1969 | } |
| 1970 | |
| 1971 | String BeMCContext::ToString(const BeMCOperand& operand) |
| 1972 | { |
nothing calls this directly
no test coverage detected