Skip to content

Commit 7b3ac21

Browse files
committed
rustc_trans: remove unused TargetDataRef accessor.
1 parent d0d1320 commit 7b3ac21

File tree

3 files changed

+0
-9
lines changed

3 files changed

+0
-9
lines changed

src/librustc_llvm/ffi.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1661,7 +1661,6 @@ extern "C" {
16611661
pub fn LLVMRustArchiveMemberFree(Member: RustArchiveMemberRef);
16621662

16631663
pub fn LLVMRustSetDataLayoutFromTargetMachine(M: ModuleRef, TM: TargetMachineRef);
1664-
pub fn LLVMRustGetModuleDataLayout(M: ModuleRef) -> TargetDataRef;
16651664

16661665
pub fn LLVMRustBuildOperandBundleDef(Name: *const c_char,
16671666
Inputs: *const ValueRef,

src/librustc_trans/context.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,6 @@ impl<'b, 'tcx> CrateContext<'b, 'tcx> {
349349
&self.codegen_unit
350350
}
351351

352-
pub fn td(&self) -> llvm::TargetDataRef {
353-
unsafe { llvm::LLVMRustGetModuleDataLayout(self.llmod()) }
354-
}
355-
356352
pub fn instances<'a>(&'a self) -> &'a RefCell<FxHashMap<Instance<'tcx>, ValueRef>> {
357353
&self.instances
358354
}

src/rustllvm/PassWrapper.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -746,10 +746,6 @@ LLVMRustSetDataLayoutFromTargetMachine(LLVMModuleRef Module,
746746
unwrap(Module)->setDataLayout(Target->createDataLayout());
747747
}
748748

749-
extern "C" LLVMTargetDataRef LLVMRustGetModuleDataLayout(LLVMModuleRef M) {
750-
return wrap(&unwrap(M)->getDataLayout());
751-
}
752-
753749
extern "C" void LLVMRustSetModulePIELevel(LLVMModuleRef M) {
754750
unwrap(M)->setPIELevel(PIELevel::Level::Large);
755751
}

0 commit comments

Comments
 (0)