diff options
author | Stephen Crane <sjc@immunant.com> | 2020-05-04 09:40:41 -0700 |
---|---|---|
committer | Stephen Crane <sjc@immunant.com> | 2020-05-04 16:22:45 -0700 |
commit | 1e426ae43ce3db2dfb642a080a0da5aefb062803 (patch) | |
tree | 6526e0eb465bfb701037d9e3350e92fc669d4613 | |
parent | d5cdad2b55300b2dea111a37fc21e589ff9d5c67 (diff) |
Do not emit Rust method wrapper for blacklisted functions
We should not emit Rust struct methods corresponding to a C++ method
unless we are actually emitting a binding for that method.
-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(); |