Skip to content

Commit 1e6074c

Browse files
committed
rustc: Mark functions as "rust" GC
1 parent 43c9fe6 commit 1e6074c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/comp/middle/trans.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,9 @@ fn decl_cdecl_fn(llmod: ModuleRef, name: &str, llty: TypeRef) -> ValueRef {
342342
}
343343

344344
fn decl_fastcall_fn(llmod: ModuleRef, name: &str, llty: TypeRef) -> ValueRef {
345-
ret decl_fn(llmod, name, lib::llvm::LLVMFastCallConv, llty);
345+
let llfn = decl_fn(llmod, name, lib::llvm::LLVMFastCallConv, llty);
346+
llvm::LLVMSetGC(llfn, str::buf("rust"));
347+
ret llfn;
346348
}
347349

348350

0 commit comments

Comments
 (0)