Skip to content

Commit ebc8507

Browse files
committed
Remove dead function rustc_llvm::debug_loc_to_string()
Refs #46437 as it also removes LLVMRustWriteDebugLocToString()
1 parent 4be1d5c commit ebc8507

File tree

4 files changed

+0
-16
lines changed

4 files changed

+0
-16
lines changed

src/librustc_llvm/ffi.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1642,8 +1642,6 @@ extern "C" {
16421642
pub fn LLVMRustWriteDiagnosticInfoToString(DI: DiagnosticInfoRef, s: RustStringRef);
16431643
pub fn LLVMRustGetDiagInfoKind(DI: DiagnosticInfoRef) -> DiagnosticKind;
16441644

1645-
pub fn LLVMRustWriteDebugLocToString(C: ContextRef, DL: DebugLocRef, s: RustStringRef);
1646-
16471645
pub fn LLVMRustSetInlineAsmDiagnosticHandler(C: ContextRef,
16481646
H: InlineAsmDiagHandler,
16491647
CX: *mut c_void);

src/librustc_llvm/lib.rs

-5
Original file line numberDiff line numberDiff line change
@@ -296,11 +296,6 @@ pub unsafe fn twine_to_string(tr: TwineRef) -> String {
296296
build_string(|s| LLVMRustWriteTwineToString(tr, s)).expect("got a non-UTF8 Twine from LLVM")
297297
}
298298

299-
pub unsafe fn debug_loc_to_string(c: ContextRef, tr: DebugLocRef) -> String {
300-
build_string(|s| LLVMRustWriteDebugLocToString(c, tr, s))
301-
.expect("got a non-UTF8 DebugLoc from LLVM")
302-
}
303-
304299
pub fn initialize_available_targets() {
305300
macro_rules! init_target(
306301
($cfg:meta, $($method:ident),*) => { {

src/rustllvm/RustWrapper.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,6 @@ extern "C" LLVMTypeRef LLVMRustArrayType(LLVMTypeRef ElementTy,
958958
}
959959

960960
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(Twine, LLVMTwineRef)
961-
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(DebugLoc, LLVMDebugLocRef)
962961

963962
extern "C" void LLVMRustWriteTwineToString(LLVMTwineRef T, RustStringRef Str) {
964963
RawRustStringOstream OS(Str);
@@ -1107,13 +1106,6 @@ extern "C" LLVMTypeKind LLVMRustGetTypeKind(LLVMTypeRef Ty) {
11071106
report_fatal_error("Unhandled TypeID.");
11081107
}
11091108

1110-
extern "C" void LLVMRustWriteDebugLocToString(LLVMContextRef C,
1111-
LLVMDebugLocRef DL,
1112-
RustStringRef Str) {
1113-
RawRustStringOstream OS(Str);
1114-
unwrap(DL)->print(OS);
1115-
}
1116-
11171109
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(SMDiagnostic, LLVMSMDiagnosticRef)
11181110

11191111
extern "C" void LLVMRustSetInlineAsmDiagnosticHandler(

src/rustllvm/rustllvm.h

-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ enum LLVMRustAttribute {
103103

104104
typedef struct OpaqueRustString *RustStringRef;
105105
typedef struct LLVMOpaqueTwine *LLVMTwineRef;
106-
typedef struct LLVMOpaqueDebugLoc *LLVMDebugLocRef;
107106
typedef struct LLVMOpaqueSMDiagnostic *LLVMSMDiagnosticRef;
108107
typedef struct LLVMOpaqueRustJITMemoryManager *LLVMRustJITMemoryManagerRef;
109108

0 commit comments

Comments
 (0)