Skip to content

Commit 1286fb6

Browse files
committed
clang-format the newly moved remove_asm.cpp
1 parent fee02f9 commit 1286fb6

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

src/assembler/remove_asm.cpp

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,16 @@ 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::argumentst arguments;
8080

81-
const typet void_pointer=
82-
pointer_type(void_typet());
81+
const typet void_pointer = pointer_type(void_typet());
8382

8483
// outputs
8584
forall_operands(it, code.op1())
8685
{
87-
if(it->operands().size()==2)
86+
if(it->operands().size() == 2)
8887
{
8988
arguments.push_back(
9089
typecast_exprt(address_of_exprt(it->op1()), void_pointer));
@@ -94,7 +93,7 @@ void remove_asmt::gcc_asm_function_call(
9493
// inputs
9594
forall_operands(it, code.op2())
9695
{
97-
if(it->operands().size()==2)
96+
if(it->operands().size() == 2)
9897
{
9998
arguments.push_back(
10099
typecast_exprt(address_of_exprt(it->op1()), void_pointer));
@@ -108,19 +107,19 @@ void remove_asmt::gcc_asm_function_call(
108107

109108
code_function_callt function_call(std::move(fkt), std::move(arguments));
110109

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

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

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

126125
symbol_table.add(symbol);
@@ -195,11 +194,11 @@ void remove_asmt::process_instruction(
195194
goto_programt::instructiont &instruction,
196195
goto_programt &dest)
197196
{
198-
const code_asmt &code=to_code_asm(instruction.code);
197+
const code_asmt &code = to_code_asm(instruction.code);
199198

200-
const irep_idt &flavor=code.get_flavor();
199+
const irep_idt &flavor = code.get_flavor();
201200

202-
if(flavor==ID_gcc)
201+
if(flavor == ID_gcc)
203202
process_instruction_gcc(code, dest);
204203
else if(flavor == ID_msc)
205204
process_instruction_msc(code, dest);
@@ -497,7 +496,7 @@ void remove_asmt::process_function(
497496
for(auto &instruction : tmp_dest.instructions)
498497
instruction.function = it->function;
499498

500-
goto_programt::targett next=it;
499+
goto_programt::targett next = it;
501500
next++;
502501

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

0 commit comments

Comments
 (0)