summaryrefslogtreecommitdiff
path: root/src/codegen/mod.rs
diff options
context:
space:
mode:
authorStephen Crane <sjc@immunant.com>2020-05-04 09:40:41 -0700
committerStephen Crane <sjc@immunant.com>2020-05-04 16:22:45 -0700
commit1e426ae43ce3db2dfb642a080a0da5aefb062803 (patch)
tree6526e0eb465bfb701037d9e3350e92fc669d4613 /src/codegen/mod.rs
parentd5cdad2b55300b2dea111a37fc21e589ff9d5c67 (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.
Diffstat (limited to 'src/codegen/mod.rs')
-rw-r--r--src/codegen/mod.rs4
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();