Skip to content

Commit 04c58c9

Browse files
committed
auto merge of #10205 : brson/rust/unnamed_addr, r=thestinger
2 parents fa8a202 + 2992720 commit 04c58c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc/middle/trans/base.rs

+2
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ pub fn decl_fn(llmod: ModuleRef, name: &str, cc: lib::llvm::CallConv, ty: Type)
182182
};
183183

184184
lib::llvm::SetFunctionCallConv(llfn, cc);
185+
// Function addresses in Rust are never significant, allowing functions to be merged.
186+
lib::llvm::SetUnnamedAddr(llfn, true);
185187
return llfn;
186188
}
187189

0 commit comments

Comments
 (0)