diff options
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 5 | ||||
-rw-r--r-- | test/Bindings/Ocaml/vmcore.ml | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index e35b14f..090276b 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -808,7 +808,10 @@ std::ostream &AssemblyWriter::printTypeAtLeastOneLevel(const Type *Ty) { if (STy->isPacked()) Out << '>'; } else if (const PointerType *PTy = dyn_cast<PointerType>(Ty)) { - printType(PTy->getElementType()) << '*'; + printType(PTy->getElementType()); + if (unsigned AddressSpace = PTy->getAddressSpace()) + Out << " addrspace(" << AddressSpace << ")"; + Out << '*'; } else if (const ArrayType *ATy = dyn_cast<ArrayType>(Ty)) { Out << '[' << ATy->getNumElements() << " x "; printType(ATy->getElementType()) << ']'; diff --git a/test/Bindings/Ocaml/vmcore.ml b/test/Bindings/Ocaml/vmcore.ml index 33a1980..65d8a31 100644 --- a/test/Bindings/Ocaml/vmcore.ml +++ b/test/Bindings/Ocaml/vmcore.ml @@ -114,7 +114,7 @@ let test_types () = end; begin group "qualified_pointer"; - (* XXX: grep {QualPtrTy.*i8.*3.*\*} < %t.ll + (* RUN: grep {QualPtrTy.*i8.*3.*\*} < %t.ll *) let ty = qualified_pointer_type i8_type 3 in insist (define_type_name "QualPtrTy" ty m); |