Declare all Rust functions as unnamed_addr. Closes #8957

This commit is contained in:
Brian Anderson 2013-10-31 14:12:17 -07:00
parent 6789a77fa0
commit 2992720c9b

View File

@ -182,6 +182,8 @@ pub fn decl_fn(llmod: ModuleRef, name: &str, cc: lib::llvm::CallConv, ty: Type)
};
lib::llvm::SetFunctionCallConv(llfn, cc);
// Function addresses in Rust are never significant, allowing functions to be merged.
lib::llvm::SetUnnamedAddr(llfn, true);
return llfn;
}