File tree 1 file changed +27
-0
lines changed 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -349,6 +349,33 @@ static bool link_functions(
349
349
}
350
350
}
351
351
352
+ // apply macros
353
+ rename_symbolt macro_application;
354
+
355
+ forall_symbols (it, dest_symbol_table.symbols )
356
+ if (it->second .is_macro )
357
+ {
358
+ const symbolt &symbol=it->second ;
359
+
360
+ assert (symbol.value .id ()==ID_symbol);
361
+ const irep_idt &id=to_symbol_expr (symbol.value ).get_identifier ();
362
+
363
+ #if 0
364
+ if(!base_type_eq(symbol.type, ns.lookup(id).type, ns))
365
+ {
366
+ std::cerr << symbol << std::endl;
367
+ std::cerr << ns.lookup(id) << std::endl;
368
+ }
369
+ assert(base_type_eq(symbol.type, ns.lookup(id).type, ns));
370
+ #endif
371
+
372
+ macro_application.insert_expr (symbol.name , id);
373
+ }
374
+
375
+ if (!macro_application.expr_map .empty ())
376
+ Forall_goto_functions (dest_it, dest_functions)
377
+ rename_symbols_in_function (dest_it->second , macro_application);
378
+
352
379
return false ;
353
380
}
354
381
You can’t perform that action at this time.
0 commit comments