-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for stubbing out foreign functions #2658
Support for stubbing out foreign functions #2658
Conversation
077ef36
to
fbc7abd
Compare
fbc7abd
to
0291658
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add a test case for the use of function pointers ad make sure it is handled, irrespective of whether we want to allow use of function pointers or not.
0291658
to
b46a20e
Compare
b46a20e
to
67bc1d3
Compare
67bc1d3
to
db361fd
Compare
db361fd
to
75de3f6
Compare
75de3f6
to
70aeb56
Compare
Signed-off-by: Felipe R. Monteiro <felisous@amazon.com>
Signed-off-by: Felipe R. Monteiro <felisous@amazon.com>
Signed-off-by: Felipe R. Monteiro <felisous@amazon.com>
Signed-off-by: Felipe R. Monteiro <felisous@amazon.com>
Signed-off-by: Felipe R. Monteiro <felisous@amazon.com>
70aeb56
to
a487eac
Compare
Signed-off-by: Felipe R. Monteiro <felisous@amazon.com>
a487eac
to
2d84403
Compare
Signed-off-by: Felipe R. Monteiro <felisous@amazon.com>
pub fn transform_foreign_functions<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { | ||
if let Some(stub_map) = get_stub_mapping(tcx) { | ||
let mut visitor = | ||
ForeignFunctionTransformer { tcx, local_decls: body.clone().local_decls, stub_map }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should do body.local_decls.clone()
instead.
Description of changes:
Support for stubbing out foreign functions.
Resolved issues:
Resolves #2587.
Call-outs:
N/A.
Testing:
How is this change tested? Regression tests.
Is this a refactor change? No.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.