summary refs log tree commit diff
path: root/src/comp/lib
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-08-26 15:36:18 -0700
committerBrian Anderson <banderson@mozilla.com>2011-08-27 15:54:44 -0700
commitd7fa75413f4c109b9ecadf4b9b3e1edd762e3056 (patch)
tree3ef1954d35a2958550a637d986cab49e7e332fd7 /src/comp/lib
parent138973335aba835a451ce7c9914c7ca020bcc753 (diff)
downloadrust-d7fa75413f4c109b9ecadf4b9b3e1edd762e3056.tar.gz
rust-d7fa75413f4c109b9ecadf4b9b3e1edd762e3056.zip
Convert rustc::lib::llvm to istr::sbufs. Issue #855
Diffstat (limited to 'src/comp/lib')
-rw-r--r--src/comp/lib/llvm.rs7
1 files changed, 4 insertions, 3 deletions
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)};
 }