Skip to content

Commit 4988c89

Browse files
committed
Move the initial dead prototype removal pass
1 parent a5b87d7 commit 4988c89

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/librustc/back/passes.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010

1111
use core::prelude::*;
1212

13-
use driver::session::{Session, Session_, No, Less, Default};
1413
use driver::session;
15-
use lib::llvm::{PassRef, ModuleRef,PassManagerRef,ValueRef,TargetDataRef};
14+
use lib::llvm::{PassRef, ModuleRef,PassManagerRef,TargetDataRef};
1615
use lib::llvm::llvm;
1716
use lib;
1817

@@ -56,12 +55,12 @@ impl PassManager {
5655

5756
pub fn populatePassManager(pm: &mut PassManager, level:session::OptLevel) {
5857
unsafe {
59-
// We add a lot of potentially-unused prototypes, so strip them right at the
60-
// start. We do it again later when we know for certain which ones are used
61-
pm.addPass(llvm::LLVMCreateStripDeadPrototypesPass());
62-
6358
if level == session::No {
6459
pm.addPass(llvm::LLVMCreateAlwaysInlinerPass());
60+
61+
// We add a lot of unused prototypes, so strip them no matter
62+
// what
63+
pm.addPass(llvm::LLVMCreateStripDeadPrototypesPass());
6564
return;
6665
}
6766

0 commit comments

Comments
 (0)