about summary refs log tree commit diff
path: root/src/rustc/lib
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-05-07 14:27:43 -0700
committerBrian Anderson <banderson@mozilla.com>2012-05-07 15:24:32 -0700
commitb99038c2bf02a24501320783feb5b1f6c5763d73 (patch)
tree7290161b62f242e1eea68493cefe3178d721eb8b /src/rustc/lib
parent0e43e8ccc8e67dbccbfdbc0c8300a41e43d8b0cf (diff)
rustc: Put all boxes into addrspace 1
Diffstat (limited to 'src/rustc/lib')
-rw-r--r--src/rustc/lib/llvm.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/rustc/lib/llvm.rs b/src/rustc/lib/llvm.rs
index 97e439f235b..f984b0de63a 100644
--- a/src/rustc/lib/llvm.rs
+++ b/src/rustc/lib/llvm.rs
@@ -1034,7 +1034,15 @@ fn type_to_str_inner(names: type_names, outer0: [TypeRef], ty: TypeRef) ->
                 ret "*\\" + int::str(n as int);
             }
         }
-        ret "*" +
+        let addrstr = {
+            let addrspace = llvm::LLVMGetPointerAddressSpace(ty) as uint;
+            if addrspace == 0u {
+                ""
+            } else {
+                #fmt("addrspace(%u)", addrspace)
+            }
+        };
+        ret addrstr + "*" +
                 type_to_str_inner(names, outer, llvm::LLVMGetElementType(ty));
       }
       13 { ret "Vector"; }