summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChristopher Lamb <christopher.lamb@gmail.com>2007-12-18 03:49:35 +0000
committerChristopher Lamb <christopher.lamb@gmail.com>2007-12-18 03:49:35 +0000
commitac7d631ed279cd1524db6f29cd0b567d1154fabb (patch)
treecb886e77ad977d063f185f39ee2fb5424a8eca19 /llvm/lib
parentb74406ba98685696dcf53c0128a4281bdf83b0a7 (diff)
downloadbcm5719-llvm-ac7d631ed279cd1524db6f29cd0b567d1154fabb.tar.gz
bcm5719-llvm-ac7d631ed279cd1524db6f29cd0b567d1154fabb.zip
Don't forget to print address space qualifiers when printing out the type table! Thanks to Gordon Henriksen for pointing this out.
llvm-svn: 45147
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/AsmWriter.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index e35b14fbc1a..090276b7ffa 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/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()) << ']';
OpenPOWER on IntegriCloud