about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBjörn Steinbrink <bsteinbr@gmail.com>2018-01-05 14:27:20 +0100
committerBjörn Steinbrink <bsteinbr@gmail.com>2018-01-07 04:39:58 +0100
commit92189bc521ce3256a53c1b435dfb6ec6740f4734 (patch)
treedb0e1a36be3c964c41a8f957dd10acd1afac69e4
parent6828cf90146c7fefc4ba4f16dffe75f763f2d910 (diff)
downloadrust-92189bc521ce3256a53c1b435dfb6ec6740f4734.tar.gz
rust-92189bc521ce3256a53c1b435dfb6ec6740f4734.zip
Remove redundant -Zdebug-llvm option
The same effect can be achieved using -Cllvm-args=-debug

Refs #46437 as it removes LLVMRustSetDebug()
-rw-r--r--src/librustc/session/config.rs4
-rw-r--r--src/librustc_driver/lib.rs5
-rw-r--r--src/librustc_llvm/ffi.rs3
-rw-r--r--src/librustc_trans/lib.rs2
-rw-r--r--src/librustc_trans/llvm_util.rs4
-rw-r--r--src/rustllvm/RustWrapper.cpp6
6 files changed, 1 insertions, 23 deletions
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index 05b1d584e9c..5e470e8d86e 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -1084,8 +1084,6 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
         "omit landing pads for unwinding"),
     fewer_names: bool = (false, parse_bool, [TRACKED],
         "reduce memory use by retaining fewer names within compilation artifacts (LLVM-IR)"),
-    debug_llvm: bool = (false, parse_bool, [UNTRACKED],
-        "enable debug output from LLVM"),
     meta_stats: bool = (false, parse_bool, [UNTRACKED],
         "gather metadata statistics"),
     print_link_args: bool = (false, parse_bool, [UNTRACKED],
@@ -2747,8 +2745,6 @@ mod tests {
         assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
         opts.debugging_opts.borrowck_stats = true;
         assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
-        opts.debugging_opts.debug_llvm = true;
-        assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
         opts.debugging_opts.meta_stats = true;
         assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
         opts.debugging_opts.print_link_args = true;
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs
index 223c602ccd3..237656eb43c 100644
--- a/src/librustc_driver/lib.rs
+++ b/src/librustc_driver/lib.rs
@@ -167,7 +167,6 @@ mod rustc_trans {
     pub use rustc_trans_utils::trans_crate::TranslatedCrate as CrateTranslation;
 
     pub fn init(_sess: &Session) {}
-    pub fn enable_llvm_debug() {}
     pub fn print_version() {}
     pub fn print_passes() {}
     pub fn print(_req: PrintRequest, _sess: &Session) {}
@@ -205,10 +204,6 @@ pub fn run_compiler<'a>(args: &[String],
 
     let (sopts, cfg) = config::build_session_options_and_crate_config(&matches);
 
-    if sopts.debugging_opts.debug_llvm {
-        rustc_trans::enable_llvm_debug();
-    }
-
     let descriptions = diagnostics_registry();
 
     do_or_return!(callbacks.early_callback(&matches,
diff --git a/src/librustc_llvm/ffi.rs b/src/librustc_llvm/ffi.rs
index 6cb1a2b5334..79909c3c5ae 100644
--- a/src/librustc_llvm/ffi.rs
+++ b/src/librustc_llvm/ffi.rs
@@ -1315,9 +1315,6 @@ extern "C" {
                              ElementCount: c_uint,
                              Packed: Bool);
 
-    /// Enables LLVM debug output.
-    pub fn LLVMRustSetDebug(Enabled: c_int);
-
     /// Prepares inline assembly.
     pub fn LLVMRustInlineAsm(Ty: TypeRef,
                              AsmString: *const c_char,
diff --git a/src/librustc_trans/lib.rs b/src/librustc_trans/lib.rs
index 039dd94465d..fd6cd5c371d 100644
--- a/src/librustc_trans/lib.rs
+++ b/src/librustc_trans/lib.rs
@@ -69,7 +69,7 @@ pub use base::trans_crate;
 use back::bytecode::RLIB_BYTECODE_EXTENSION;
 
 pub use metadata::LlvmMetadataLoader;
-pub use llvm_util::{init, target_features, print_version, print_passes, print, enable_llvm_debug};
+pub use llvm_util::{init, target_features, print_version, print_passes, print};
 
 use std::any::Any;
 use std::path::PathBuf;
diff --git a/src/librustc_trans/llvm_util.rs b/src/librustc_trans/llvm_util.rs
index a9ea96134fa..b3d0b574d1d 100644
--- a/src/librustc_trans/llvm_util.rs
+++ b/src/librustc_trans/llvm_util.rs
@@ -140,7 +140,3 @@ pub fn print(req: PrintRequest, sess: &Session) {
         }
     }
 }
-
-pub fn enable_llvm_debug() {
-    unsafe { llvm::LLVMRustSetDebug(1); }
-}
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index 0fac7f7bf28..e9eaad853d5 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -384,12 +384,6 @@ LLVMRustBuildAtomicFence(LLVMBuilderRef B, LLVMAtomicOrdering Order,
   return wrap(unwrap(B)->CreateFence(fromRust(Order), fromRust(Scope)));
 }
 
-extern "C" void LLVMRustSetDebug(int Enabled) {
-#ifndef NDEBUG
-  DebugFlag = Enabled;
-#endif
-}
-
 enum class LLVMRustAsmDialect {
   Other,
   Att,