]> git.lizzy.rs Git - rust.git/commitdiff
Remove dead function rustc_llvm::debug_loc_to_string()
authorBjörn Steinbrink <bsteinbr@gmail.com>
Fri, 5 Jan 2018 14:22:35 +0000 (15:22 +0100)
committerBjörn Steinbrink <bsteinbr@gmail.com>
Sun, 7 Jan 2018 03:39:58 +0000 (04:39 +0100)
Refs #46437 as it also removes LLVMRustWriteDebugLocToString()

src/librustc_llvm/ffi.rs
src/librustc_llvm/lib.rs
src/rustllvm/RustWrapper.cpp
src/rustllvm/rustllvm.h

index 8ed3953b8148a6a49b9bfdcb865087bfc9f94798..2cfb151ae85da6bc41bde3192d8fd50cd453cfae 100644 (file)
@@ -1642,8 +1642,6 @@ pub fn LLVMRustUnpackInlineAsmDiagnostic(DI: DiagnosticInfoRef,
     pub fn LLVMRustWriteDiagnosticInfoToString(DI: DiagnosticInfoRef, s: RustStringRef);
     pub fn LLVMRustGetDiagInfoKind(DI: DiagnosticInfoRef) -> DiagnosticKind;
 
-    pub fn LLVMRustWriteDebugLocToString(C: ContextRef, DL: DebugLocRef, s: RustStringRef);
-
     pub fn LLVMRustSetInlineAsmDiagnosticHandler(C: ContextRef,
                                                  H: InlineAsmDiagHandler,
                                                  CX: *mut c_void);
index 592bd62056455534cfcbb331abb1aa555a2da635..c75a026a0f8b9465740cda6f78dbcf7aecb5a1fd 100644 (file)
@@ -296,11 +296,6 @@ pub unsafe fn twine_to_string(tr: TwineRef) -> String {
     build_string(|s| LLVMRustWriteTwineToString(tr, s)).expect("got a non-UTF8 Twine from LLVM")
 }
 
-pub unsafe fn debug_loc_to_string(c: ContextRef, tr: DebugLocRef) -> String {
-    build_string(|s| LLVMRustWriteDebugLocToString(c, tr, s))
-        .expect("got a non-UTF8 DebugLoc from LLVM")
-}
-
 pub fn initialize_available_targets() {
     macro_rules! init_target(
         ($cfg:meta, $($method:ident),*) => { {
index 8030a545ec30a4038d69edcd0d44360e10725268..95130d596e165b05498143c96feb0805d7dc78ba 100644 (file)
@@ -958,7 +958,6 @@ extern "C" LLVMTypeRef LLVMRustArrayType(LLVMTypeRef ElementTy,
 }
 
 DEFINE_SIMPLE_CONVERSION_FUNCTIONS(Twine, LLVMTwineRef)
-DEFINE_SIMPLE_CONVERSION_FUNCTIONS(DebugLoc, LLVMDebugLocRef)
 
 extern "C" void LLVMRustWriteTwineToString(LLVMTwineRef T, RustStringRef Str) {
   RawRustStringOstream OS(Str);
@@ -1107,13 +1106,6 @@ extern "C" LLVMTypeKind LLVMRustGetTypeKind(LLVMTypeRef Ty) {
   report_fatal_error("Unhandled TypeID.");
 }
 
-extern "C" void LLVMRustWriteDebugLocToString(LLVMContextRef C,
-                                              LLVMDebugLocRef DL,
-                                              RustStringRef Str) {
-  RawRustStringOstream OS(Str);
-  unwrap(DL)->print(OS);
-}
-
 DEFINE_SIMPLE_CONVERSION_FUNCTIONS(SMDiagnostic, LLVMSMDiagnosticRef)
 
 extern "C" void LLVMRustSetInlineAsmDiagnosticHandler(
index 714173f86020da25c53cc3648fa5adf075d35106..b92834bc94001138aaf41cae7d459f561aaa7265 100644 (file)
@@ -103,7 +103,6 @@ enum LLVMRustAttribute {
 
 typedef struct OpaqueRustString *RustStringRef;
 typedef struct LLVMOpaqueTwine *LLVMTwineRef;
-typedef struct LLVMOpaqueDebugLoc *LLVMDebugLocRef;
 typedef struct LLVMOpaqueSMDiagnostic *LLVMSMDiagnosticRef;
 typedef struct LLVMOpaqueRustJITMemoryManager *LLVMRustJITMemoryManagerRef;