aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/AsmWriter.cpp
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
commitef989a275c1191f583178c6934f3594e7a9fd3a6 (patch)
tree67c5f824e427f96abb2f0ff7f4cf604848754e46 /lib/VMCore/AsmWriter.cpp
parent9bc55bcbc03a880277ea7e492e4ec1752e6ffbad (diff)
downloadexternal_llvm-ef989a275c1191f583178c6934f3594e7a9fd3a6.zip
external_llvm-ef989a275c1191f583178c6934f3594e7a9fd3a6.tar.gz
external_llvm-ef989a275c1191f583178c6934f3594e7a9fd3a6.tar.bz2
Don't forget to print address space qualifiers when printing out the type table! Thanks to Gordon Henriksen for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45147 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/AsmWriter.cpp')
-rw-r--r--lib/VMCore/AsmWriter.cpp5
1 files changed, 4 insertions, 1 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()) << ']';