mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
23 lines
779 B
Python
23 lines
779 B
Python
#
|
|
# This file is distributed under the MIT License. See LICENSE.md for details.
|
|
#
|
|
|
|
from revng.model.migrations import MigrationBase
|
|
|
|
|
|
class Migration(MigrationBase):
|
|
def _update_attributes(self, attributes):
|
|
for index, value in enumerate(attributes):
|
|
if value == "Inline":
|
|
attributes[index] = "AlwaysInline"
|
|
|
|
def migrate(self, binary):
|
|
for function in binary.get("Functions", {}):
|
|
self._update_attributes(function.get("Attributes", []))
|
|
|
|
for callsite in function.get("CallSitePrototypes", []):
|
|
self._update_attributes(callsite.get("Attributes", []))
|
|
|
|
for function in binary.get("ImportedDynamicFunctions", {}):
|
|
self._update_attributes(function.get("Attributes", []))
|