ClangFrontend.CArithmetic_trans
Utility module for translating unary, binary, and atomic operations and compound assignments
val bin_op_to_string : ATDGenerated.Clang_ast_t.binary_operator_info -> string
val binary_operation_instruction :
ATDGenerated.Clang_ast_t.source_range ->
ATDGenerated.Clang_ast_t.binary_operator_info ->
(IR.Exp.t * IR.Typ.t) ->
IR.Typ.t ->
(IR.Exp.t * IR.Typ.t) ->
IBase.Location.t ->
IR.Exp.t * IR.Sil.instr list
Returns a pair (binary_expression, instructions)
for binary operator representing a CompoundAssignment. binary_expression
is returned when we are calculating an expression instructions
is not empty when the binary operator is actually a statement like an assignment.
val unary_operation_instruction :
CFrontend_config.translation_unit_context ->
ATDGenerated.Clang_ast_t.unary_operator_info ->
IR.Exp.t ->
IR.Typ.t ->
IBase.Location.t ->
IR.Exp.t * IR.Sil.instr list
val atomic_operation_instruction :
ATDGenerated.Clang_ast_t.atomic_expr_info ->
IR.Exp.t ->
IR.Exp.t ->
IR.Typ.t ->
IBase.Location.t ->
IR.Exp.t * IR.Sil.instr list