From d7fa75413f4c109b9ecadf4b9b3e1edd762e3056 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 26 Aug 2011 15:36:18 -0700 Subject: Convert rustc::lib::llvm to istr::sbufs. Issue #855 --- src/comp/lib/llvm.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/comp/lib') diff --git a/src/comp/lib/llvm.rs b/src/comp/lib/llvm.rs index 6692bcea070..a090f7cc667 100644 --- a/src/comp/lib/llvm.rs +++ b/src/comp/lib/llvm.rs @@ -1,7 +1,6 @@ import std::vec; -import std::str; import std::istr; -import std::str::rustrt::sbuf; +import std::istr::sbuf; import llvm::ModuleRef; import llvm::ContextRef; @@ -1070,7 +1069,9 @@ resource target_data_res(TD: TargetDataRef) { type target_data = {lltd: TargetDataRef, dtor: @target_data_res}; fn mk_target_data(string_rep: str) -> target_data { - let lltd = llvm::LLVMCreateTargetData(str::buf(string_rep)); + let lltd = istr::as_buf(istr::from_estr(string_rep), { |buf| + llvm::LLVMCreateTargetData(buf) + }); ret {lltd: lltd, dtor: @target_data_res(lltd)}; } -- cgit 1.4.1-3-g733a5