Skip to content

Commit 35823a8

Browse files
committed
clang-format the newly moved remove_asm.cpp
1 parent 8951ffc commit 35823a8

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

src/assembler/remove_asm.cpp

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,17 @@ void remove_asmt::gcc_asm_function_call(
7474
const code_asmt &code,
7575
goto_programt &dest)
7676
{
77-
irep_idt function_identifier=function_base_name;
77+
irep_idt function_identifier = function_base_name;
7878

7979
code_function_callt function_call;
8080
function_call.lhs().make_nil();
8181

82-
const typet void_pointer=
83-
pointer_type(void_typet());
82+
const typet void_pointer = pointer_type(void_typet());
8483

8584
// outputs
8685
forall_operands(it, code.op1())
8786
{
88-
if(it->operands().size()==2)
87+
if(it->operands().size() == 2)
8988
{
9089
function_call.arguments().push_back(
9190
typecast_exprt(address_of_exprt(it->op1()), void_pointer));
@@ -95,7 +94,7 @@ void remove_asmt::gcc_asm_function_call(
9594
// inputs
9695
forall_operands(it, code.op2())
9796
{
98-
if(it->operands().size()==2)
97+
if(it->operands().size() == 2)
9998
{
10099
function_call.arguments().push_back(
101100
typecast_exprt(address_of_exprt(it->op1()), void_pointer));
@@ -107,21 +106,21 @@ void remove_asmt::gcc_asm_function_call(
107106

108107
symbol_exprt fkt(function_identifier, fkt_type);
109108

110-
function_call.function()=fkt;
109+
function_call.function() = fkt;
111110

112-
goto_programt::targett call=dest.add_instruction(FUNCTION_CALL);
113-
call->code=function_call;
114-
call->source_location=code.source_location();
111+
goto_programt::targett call = dest.add_instruction(FUNCTION_CALL);
112+
call->code = function_call;
113+
call->source_location = code.source_location();
115114

116115
// do we have it?
117116
if(!symbol_table.has_symbol(function_identifier))
118117
{
119118
symbolt symbol;
120119

121-
symbol.name=function_identifier;
122-
symbol.type=fkt_type;
123-
symbol.base_name=function_base_name;
124-
symbol.value=nil_exprt();
120+
symbol.name = function_identifier;
121+
symbol.type = fkt_type;
122+
symbol.base_name = function_base_name;
123+
symbol.value = nil_exprt();
125124
symbol.mode = ID_C;
126125

127126
symbol_table.add(symbol);
@@ -196,11 +195,11 @@ void remove_asmt::process_instruction(
196195
goto_programt::instructiont &instruction,
197196
goto_programt &dest)
198197
{
199-
const code_asmt &code=to_code_asm(instruction.code);
198+
const code_asmt &code = to_code_asm(instruction.code);
200199

201-
const irep_idt &flavor=code.get_flavor();
200+
const irep_idt &flavor = code.get_flavor();
202201

203-
if(flavor==ID_gcc)
202+
if(flavor == ID_gcc)
204203
process_instruction_gcc(code, dest);
205204
else if(flavor == ID_msc)
206205
process_instruction_msc(code, dest);
@@ -488,7 +487,7 @@ void remove_asmt::process_function(
488487

489488
Forall_goto_program_instructions(it, goto_function.body)
490489
{
491-
if(it->is_other() && it->code.get_statement()==ID_asm)
490+
if(it->is_other() && it->code.get_statement() == ID_asm)
492491
{
493492
goto_programt tmp_dest;
494493
process_instruction(*it, tmp_dest);
@@ -498,7 +497,7 @@ void remove_asmt::process_function(
498497
for(auto &instruction : tmp_dest.instructions)
499498
instruction.function = it->function;
500499

501-
goto_programt::targett next=it;
500+
goto_programt::targett next = it;
502501
next++;
503502

504503
goto_function.body.destructive_insert(next, tmp_dest);

0 commit comments

Comments
 (0)