Function to disable the inline attribute

Is it possible to append attributes to disable inlining to functions when traversing functions with pass?

In a module pass, it seems like you should be able do this, although of course the pass would need to run before the inliner. You would also need to remove attributes that require or encourage inlining, as the inconsistency could lead to errors or assertions.