diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2020-05-05 11:43:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-05 11:43:43 +0200 |
commit | ee2f289a2d57e4d67fe38d060f0c93e9ab866183 (patch) | |
tree | 1b0fa35b09107e4912413f0cfb985b7a05f4be43 /src/codegen/mod.rs | |
parent | d5cdad2b55300b2dea111a37fc21e589ff9d5c67 (diff) | |
parent | b9eefb6da7ded8eb688f76fc98469c869d404905 (diff) |
Merge pull request #1775 from immunant/blacklist_method_impl
Do not emit Rust method wrapper for blacklisted functions
Diffstat (limited to 'src/codegen/mod.rs')
-rw-r--r-- | src/codegen/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs index 408d88bf..8344c4d1 100644 --- a/src/codegen/mod.rs +++ b/src/codegen/mod.rs @@ -2146,6 +2146,10 @@ impl MethodCodegen for Method { // First of all, output the actual function. let function_item = ctx.resolve_item(self.signature()); + if function_item.is_blacklisted(ctx) { + // We shouldn't emit a method declaration if the function is blacklisted + return; + } function_item.codegen(ctx, result, &()); let function = function_item.expect_function(); |