diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs index f831b006642..482ae02503b 100644 --- a/src/librustc/session/config.rs +++ b/src/librustc/session/config.rs @@ -1152,8 +1152,8 @@ fn parse_cross_lang_lto(slot: &mut CrossLangLto, v: Option<&str>) -> bool { "gather codegen statistics"), asm_comments: bool = (false, parse_bool, [TRACKED], "generate comments into the assembly (may change behavior)"), - no_verify: bool = (false, parse_bool, [TRACKED], - "skip LLVM verification"), + verify_llvm_ir: bool = (false, parse_bool, [TRACKED], + "verify LLVM IR"), borrowck_stats: bool = (false, parse_bool, [UNTRACKED], "gather borrowck statistics"), no_landing_pads: bool = (false, parse_bool, [TRACKED], @@ -3097,7 +3097,7 @@ fn test_debugging_options_tracking_hash() { assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash()); opts = reference.clone(); - opts.debugging_opts.no_verify = true; + opts.debugging_opts.verify_llvm_ir = true; assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash()); opts = reference.clone(); diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs index 076d56fb808..64075926b65 100644 --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs @@ -513,8 +513,8 @@ pub fn meta_stats(&self) -> bool { pub fn asm_comments(&self) -> bool { self.opts.debugging_opts.asm_comments } - pub fn no_verify(&self) -> bool { - self.opts.debugging_opts.no_verify + pub fn verify_llvm_ir(&self) -> bool { + self.opts.debugging_opts.verify_llvm_ir } pub fn borrowck_stats(&self) -> bool { self.opts.debugging_opts.borrowck_stats diff --git a/src/librustc_codegen_llvm/back/lto.rs b/src/librustc_codegen_llvm/back/lto.rs index 415dd605220..a33f8b569d0 100644 --- a/src/librustc_codegen_llvm/back/lto.rs +++ b/src/librustc_codegen_llvm/back/lto.rs @@ -462,7 +462,7 @@ fn run_pass_manager(cgcx: &CodegenContext, let pm = llvm::LLVMCreatePassManager(); llvm::LLVMRustAddAnalysisPasses(tm, pm, llmod); - if !config.no_verify { + if config.verify_llvm_ir { let pass = llvm::LLVMRustFindAndCreatePass("verify\0".as_ptr() as *const _); assert!(!pass.is_null()); llvm::LLVMRustAddPass(pm, pass); @@ -497,7 +497,7 @@ fn run_pass_manager(cgcx: &CodegenContext, } }); - if !config.no_verify { + if config.verify_llvm_ir { let pass = llvm::LLVMRustFindAndCreatePass("verify\0".as_ptr() as *const _); assert!(!pass.is_null()); llvm::LLVMRustAddPass(pm, pass); diff --git a/src/librustc_codegen_llvm/back/write.rs b/src/librustc_codegen_llvm/back/write.rs index b34dae98d7a..f6e2d68d7fa 100644 --- a/src/librustc_codegen_llvm/back/write.rs +++ b/src/librustc_codegen_llvm/back/write.rs @@ -232,7 +232,7 @@ pub struct ModuleConfig { emit_obj: bool, // Miscellaneous flags. These are mostly copied from command-line // options. - pub no_verify: bool, + pub verify_llvm_ir: bool, no_prepopulate_passes: bool, no_builtins: bool, time_passes: bool, @@ -271,7 +271,7 @@ fn new(passes: Vec) -> ModuleConfig { embed_bitcode_marker: false, no_integrated_as: false, - no_verify: false, + verify_llvm_ir: false, no_prepopulate_passes: false, no_builtins: false, time_passes: false, @@ -283,7 +283,7 @@ fn new(passes: Vec) -> ModuleConfig { } fn set_flags(&mut self, sess: &Session, no_builtins: bool) { - self.no_verify = sess.no_verify(); + self.verify_llvm_ir = sess.verify_llvm_ir(); self.no_prepopulate_passes = sess.opts.cg.no_prepopulate_passes; self.no_builtins = no_builtins || sess.target.target.options.no_builtins; self.time_passes = sess.time_passes(); @@ -542,7 +542,7 @@ unsafe fn optimize(cgcx: &CodegenContext, true }; - if !config.no_verify { assert!(addpass("verify")); } + if config.verify_llvm_ir { assert!(addpass("verify")); } if !config.no_prepopulate_passes { llvm::LLVMRustAddAnalysisPasses(tm, fpm, llmod); llvm::LLVMRustAddAnalysisPasses(tm, mpm, llmod);