Skip to content

Commit 251c346

Browse files
committed
---
yaml --- r: 151019 b: refs/heads/try2 c: 70f3409 h: refs/heads/master i: 151017: 909dc12 151015: fe74917 v: v3
1 parent 92b3579 commit 251c346

File tree

2 files changed

+13
-40
lines changed

2 files changed

+13
-40
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 637addde1f9d6f830115fa6b71c74bb43675fa2c
8+
refs/heads/try2: 70f3409875be7c2d0f9d48092eb98f11ee734378
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/lib/llvm.rs

Lines changed: 12 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1882,37 +1882,23 @@ impl TypeNames {
18821882

18831883
/* Memory-managed interface to target data. */
18841884

1885-
pub struct target_data_res {
1886-
pub td: TargetDataRef,
1885+
pub struct TargetData {
1886+
pub lltd: TargetDataRef
18871887
}
18881888

1889-
impl Drop for target_data_res {
1889+
impl Drop for TargetData {
18901890
fn drop(&mut self) {
18911891
unsafe {
1892-
llvm::LLVMDisposeTargetData(self.td);
1892+
llvm::LLVMDisposeTargetData(self.lltd);
18931893
}
18941894
}
18951895
}
18961896

1897-
pub fn target_data_res(td: TargetDataRef) -> target_data_res {
1898-
target_data_res {
1899-
td: td
1900-
}
1901-
}
1902-
1903-
pub struct TargetData {
1904-
pub lltd: TargetDataRef,
1905-
dtor: @target_data_res
1906-
}
1907-
19081897
pub fn mk_target_data(string_rep: &str) -> TargetData {
1909-
let lltd = string_rep.with_c_str(|buf| {
1910-
unsafe { llvm::LLVMCreateTargetData(buf) }
1911-
});
1912-
19131898
TargetData {
1914-
lltd: lltd,
1915-
dtor: @target_data_res(lltd)
1899+
lltd: string_rep.with_c_str(|buf| {
1900+
unsafe { llvm::LLVMCreateTargetData(buf) }
1901+
})
19161902
}
19171903
}
19181904

@@ -1949,35 +1935,22 @@ impl Drop for ObjectFile {
19491935

19501936
/* Memory-managed interface to section iterators. */
19511937

1952-
pub struct section_iter_res {
1953-
pub si: SectionIteratorRef,
1938+
pub struct SectionIter {
1939+
pub llsi: SectionIteratorRef
19541940
}
19551941

1956-
impl Drop for section_iter_res {
1942+
impl Drop for SectionIter {
19571943
fn drop(&mut self) {
19581944
unsafe {
1959-
llvm::LLVMDisposeSectionIterator(self.si);
1945+
llvm::LLVMDisposeSectionIterator(self.llsi);
19601946
}
19611947
}
19621948
}
19631949

1964-
pub fn section_iter_res(si: SectionIteratorRef) -> section_iter_res {
1965-
section_iter_res {
1966-
si: si
1967-
}
1968-
}
1969-
1970-
pub struct SectionIter {
1971-
pub llsi: SectionIteratorRef,
1972-
dtor: @section_iter_res
1973-
}
1974-
19751950
pub fn mk_section_iter(llof: ObjectFileRef) -> SectionIter {
19761951
unsafe {
1977-
let llsi = llvm::LLVMGetSections(llof);
19781952
SectionIter {
1979-
llsi: llsi,
1980-
dtor: @section_iter_res(llsi)
1953+
llsi: llvm::LLVMGetSections(llof)
19811954
}
19821955
}
19831956
}

0 commit comments

Comments
 (0)