@@ -21,7 +21,6 @@ pub struct LlvmArchiveBuilder<'a> {
2121 sess : & ' a Session ,
2222 dst : PathBuf ,
2323 src : Option < PathBuf > ,
24- removals : Vec < String > ,
2524 additions : Vec < Addition > ,
2625 src_archive : Option < Option < ArchiveRO > > ,
2726}
@@ -65,35 +64,11 @@ impl<'a> ArchiveBuilder<'a> for LlvmArchiveBuilder<'a> {
6564 sess,
6665 dst : output. to_path_buf ( ) ,
6766 src : input. map ( |p| p. to_path_buf ( ) ) ,
68- removals : Vec :: new ( ) ,
6967 additions : Vec :: new ( ) ,
7068 src_archive : None ,
7169 }
7270 }
7371
74- /// Removes a file from this archive
75- fn remove_file ( & mut self , file : & str ) {
76- self . removals . push ( file. to_string ( ) ) ;
77- }
78-
79- /// Lists all files in an archive
80- fn src_files ( & mut self ) -> Vec < String > {
81- if self . src_archive ( ) . is_none ( ) {
82- return Vec :: new ( ) ;
83- }
84-
85- let archive = self . src_archive . as_ref ( ) . unwrap ( ) . as_ref ( ) . unwrap ( ) ;
86-
87- archive
88- . iter ( )
89- . filter_map ( |child| child. ok ( ) )
90- . filter ( is_relevant_child)
91- . filter_map ( |child| child. name ( ) )
92- . filter ( |name| !self . removals . iter ( ) . any ( |x| x == name) )
93- . map ( |name| name. to_owned ( ) )
94- . collect ( )
95- }
96-
9772 fn add_archive < F > ( & mut self , archive : & Path , skip : F ) -> io:: Result < ( ) >
9873 where
9974 F : FnMut ( & str ) -> bool + ' static ,
@@ -296,7 +271,6 @@ impl<'a> LlvmArchiveBuilder<'a> {
296271 }
297272
298273 fn build_with_llvm ( & mut self , kind : ArchiveKind ) -> io:: Result < ( ) > {
299- let removals = mem:: take ( & mut self . removals ) ;
300274 let mut additions = mem:: take ( & mut self . additions ) ;
301275 let mut strings = Vec :: new ( ) ;
302276 let mut members = Vec :: new ( ) ;
@@ -308,9 +282,6 @@ impl<'a> LlvmArchiveBuilder<'a> {
308282 for child in archive. iter ( ) {
309283 let child = child. map_err ( string_to_io_error) ?;
310284 let Some ( child_name) = child. name ( ) else { continue } ;
311- if removals. iter ( ) . any ( |r| r == child_name) {
312- continue ;
313- }
314285
315286 let name = CString :: new ( child_name) ?;
316287 members. push ( llvm:: LLVMRustArchiveMemberNew (
0 commit comments