Skip to content

Commit

Permalink
Bugfix. If a function has a noinline attribute, the wrapper will inhe…
Browse files Browse the repository at this point in the history
…rit it but we don't want that
  • Loading branch information
Tarun Prabhu committed Jul 21, 2020
1 parent 5b4ff34 commit e36741d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cfe/GenerateWrappersPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class GenerateWrappersPass : public ModulePass {
// The wrapper function is short and should probably get inlined anyway,
// but just in case, force the issue. No reason to incur additional
// function call overhead if it can be avoided
wrapper->removeFnAttr(Attribute::AttrKind::NoInline);
wrapper->addFnAttr(Attribute::AttrKind::AlwaysInline);

// Replace all uses of the old function with the new one. Do this first
Expand Down

0 comments on commit e36741d

Please sign in to comment.