r362623 - [Clang] Fix pretty printing of CUDA address spaces
Anastasia Stulova via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 5 10:29:00 PDT 2019
Author: stulova
Date: Wed Jun 5 10:29:00 2019
New Revision: 362623
URL: http://llvm.org/viewvc/llvm-project?rev=362623&view=rev
Log:
[Clang] Fix pretty printing of CUDA address spaces
Patch by richardmembarth (Richard Membarth)!
Differential Revision: https://reviews.llvm.org/D54258
Modified:
cfe/trunk/lib/AST/TypePrinter.cpp
Modified: cfe/trunk/lib/AST/TypePrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/TypePrinter.cpp?rev=362623&r1=362622&r2=362623&view=diff
==============================================================================
--- cfe/trunk/lib/AST/TypePrinter.cpp (original)
+++ cfe/trunk/lib/AST/TypePrinter.cpp Wed Jun 5 10:29:00 2019
@@ -1805,17 +1805,19 @@ void Qualifiers::print(raw_ostream &OS,
case LangAS::opencl_private:
break;
case LangAS::opencl_constant:
- case LangAS::cuda_constant:
OS << "__constant";
break;
case LangAS::opencl_generic:
OS << "__generic";
break;
case LangAS::cuda_device:
- OS << "__device";
+ OS << "__device__";
+ break;
+ case LangAS::cuda_constant:
+ OS << "__constant__";
break;
case LangAS::cuda_shared:
- OS << "__shared";
+ OS << "__shared__";
break;
default:
OS << "__attribute__((address_space(";
More information about the cfe-commits
mailing list