Skip to content

Commit

Permalink
Remove dead function rustc_llvm::debug_loc_to_string()
Browse files Browse the repository at this point in the history
Refs #46437 as it also removes LLVMRustWriteDebugLocToString()
  • Loading branch information
dotdash committed Jan 7, 2018
1 parent 4be1d5c commit ebc8507
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 16 deletions.
2 changes: 0 additions & 2 deletions src/librustc_llvm/ffi.rs
Expand Up @@ -1642,8 +1642,6 @@ extern "C" {
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);
Expand Down
5 changes: 0 additions & 5 deletions src/librustc_llvm/lib.rs
Expand Up @@ -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),*) => { {
Expand Down
8 changes: 0 additions & 8 deletions src/rustllvm/RustWrapper.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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(
Expand Down
1 change: 0 additions & 1 deletion src/rustllvm/rustllvm.h
Expand Up @@ -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;

Expand Down

0 comments on commit ebc8507

Please sign in to comment.