diff options
author | Christopher Lamb <christopher.lamb@gmail.com> | 2007-12-17 01:12:55 +0000 |
---|---|---|
committer | Christopher Lamb <christopher.lamb@gmail.com> | 2007-12-17 01:12:55 +0000 |
commit | edf0788758c1245d40c3355914ddb310117f457b (patch) | |
tree | d9a6df96cce2d9fed1ee681eb546e5a02126bbe2 /llvm/tools/llvm2cpp/CppWriter.cpp | |
parent | 77560fbde7cbb2d2d6cdf39c9f3ad4feb725daaf (diff) | |
download | bcm5719-llvm-edf0788758c1245d40c3355914ddb310117f457b.tar.gz bcm5719-llvm-edf0788758c1245d40c3355914ddb310117f457b.zip |
Change the PointerType api for creating pointer types. The old functionality of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space.
llvm-svn: 45082
Diffstat (limited to 'llvm/tools/llvm2cpp/CppWriter.cpp')
-rw-r--r-- | llvm/tools/llvm2cpp/CppWriter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvm2cpp/CppWriter.cpp b/llvm/tools/llvm2cpp/CppWriter.cpp index 18bdc1b6668..b3aaf25a382 100644 --- a/llvm/tools/llvm2cpp/CppWriter.cpp +++ b/llvm/tools/llvm2cpp/CppWriter.cpp @@ -577,7 +577,8 @@ CppWriter::printTypeInternal(const Type* Ty) { bool isForward = printTypeInternal(ET); std::string elemName(getCppName(ET)); Out << "PointerType* " << typeName << " = PointerType::get(" - << elemName << (isForward ? "_fwd" : "") << ");"; + << elemName << (isForward ? "_fwd" : "") + << ", " << utostr(PT->getAddressSpace()) << ");"; nl(Out); break; } |