Determine output type based on input types.
| 46 | |
| 47 | // Determine output type based on input types. |
| 48 | TypePtr resolveTypeImpl( |
| 49 | std::vector<std::shared_ptr<const core::ITypedExpr>> inputs, |
| 50 | const std::shared_ptr<const CallExpr>& expr, |
| 51 | bool nullOnFailure, |
| 52 | Expressions::TypeResolverHook customResolverHook = nullptr) { |
| 53 | if (customResolverHook) { |
| 54 | auto type = customResolverHook(inputs, expr, nullOnFailure); |
| 55 | if (type) { |
| 56 | return type; |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | BOLT_CHECK_NOT_NULL(Expressions::getResolverHook()); |
| 61 | return Expressions::getResolverHook()(inputs, expr, nullOnFailure); |
| 62 | } |
| 63 | |
| 64 | namespace { |
| 65 | std::shared_ptr<const core::CastTypedExpr> makeTypedCast( |
no outgoing calls
no test coverage detected