Re-format some obj dtors that were messed up by the pretty-printer
This commit is contained in:
parent
0334faef1f
commit
2593c50e75
3 changed files with 20 additions and 16 deletions
|
@ -1554,8 +1554,8 @@ fn fn_ty_param_tys(fn_ty: TypeRef) -> TypeRef[] {
|
|||
|
||||
/* Memory-managed interface to target data. */
|
||||
|
||||
obj target_data_dtor(TD: TargetDataRef)
|
||||
{drop { llvm::LLVMDisposeTargetData(TD); }
|
||||
obj target_data_dtor(TD: TargetDataRef) {
|
||||
drop { llvm::LLVMDisposeTargetData(TD); }
|
||||
}
|
||||
|
||||
type target_data = {lltd: TargetDataRef, dtor: target_data_dtor};
|
||||
|
@ -1567,8 +1567,8 @@ fn mk_target_data(string_rep: str) -> target_data {
|
|||
|
||||
/* Memory-managed interface to pass managers. */
|
||||
|
||||
obj pass_manager_dtor(PM: PassManagerRef)
|
||||
{drop { llvm::LLVMDisposePassManager(PM); }
|
||||
obj pass_manager_dtor(PM: PassManagerRef) {
|
||||
drop { llvm::LLVMDisposePassManager(PM); }
|
||||
}
|
||||
|
||||
type pass_manager = {llpm: PassManagerRef, dtor: pass_manager_dtor};
|
||||
|
@ -1580,8 +1580,8 @@ fn mk_pass_manager() -> pass_manager {
|
|||
|
||||
/* Memory-managed interface to object files. */
|
||||
|
||||
obj object_file_dtor(ObjectFile: ObjectFileRef)
|
||||
{drop { llvm::LLVMDisposeObjectFile(ObjectFile); }
|
||||
obj object_file_dtor(ObjectFile: ObjectFileRef) {
|
||||
drop { llvm::LLVMDisposeObjectFile(ObjectFile); }
|
||||
}
|
||||
|
||||
type object_file = {llof: ObjectFileRef, dtor: object_file_dtor};
|
||||
|
@ -1593,8 +1593,8 @@ fn mk_object_file(llmb: MemoryBufferRef) -> object_file {
|
|||
|
||||
/* Memory-managed interface to section iterators. */
|
||||
|
||||
obj section_iter_dtor(SI: SectionIteratorRef)
|
||||
{drop { llvm::LLVMDisposeSectionIterator(SI); }
|
||||
obj section_iter_dtor(SI: SectionIteratorRef) {
|
||||
drop { llvm::LLVMDisposeSectionIterator(SI); }
|
||||
}
|
||||
|
||||
type section_iter = {llsi: SectionIteratorRef, dtor: section_iter_dtor};
|
||||
|
|
|
@ -70,7 +70,8 @@ obj FILE_buf_reader(f: os::libc::FILE, must_close: bool) {
|
|||
}
|
||||
fn tell() -> uint {
|
||||
ret os::libc::ftell(f) as uint;
|
||||
}drop { if must_close { os::libc::fclose(f); } }
|
||||
}
|
||||
drop { if must_close { os::libc::fclose(f); } }
|
||||
}
|
||||
|
||||
|
||||
|
@ -248,7 +249,8 @@ obj FILE_writer(f: os::libc::FILE, must_close: bool) {
|
|||
}
|
||||
fn tell() -> uint {
|
||||
ret os::libc::ftell(f) as uint;
|
||||
}drop { if must_close { os::libc::fclose(f); } }
|
||||
}
|
||||
drop { if must_close { os::libc::fclose(f); } }
|
||||
}
|
||||
|
||||
obj fd_buf_writer(fd: int, must_close: bool) {
|
||||
|
@ -274,7 +276,8 @@ obj fd_buf_writer(fd: int, must_close: bool) {
|
|||
fn tell() -> uint {
|
||||
log_err "need 64-bit native calls for tell, sorry";
|
||||
fail;
|
||||
}drop { if must_close { os::libc::close(fd); } }
|
||||
}
|
||||
drop { if must_close { os::libc::close(fd); } }
|
||||
}
|
||||
|
||||
fn file_buf_writer(path: str, flags: vec[fileflag]) -> buf_writer {
|
||||
|
|
|
@ -73,7 +73,8 @@ fn start_program(prog: str, args: vec[str]) -> @program {
|
|||
finished = true;
|
||||
self.close_input();
|
||||
ret os::waitpid(pid);
|
||||
}drop {
|
||||
}
|
||||
drop {
|
||||
self.close_input();
|
||||
if !finished { os::waitpid(pid); }
|
||||
os::libc::fclose(out_file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue