[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

Alexander Richardson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 12 09:11:44 PDT 2017


arichardson added inline comments.


================
Comment at: lib/AST/TypePrinter.cpp:1323
     OS << "address_space(";
-    OS << T->getEquivalentType().getAddressSpace();
+    OS << T->getEquivalentType()
+              .getQualifiers()
----------------
Anastasia wrote:
> Why do we need this change?
`__attribute__((address_space(n)))` is a target address space and not a language address space like `LangAS::opencl_generic`. Isn't `Qualifiers::getAddressSpaceAttributePrintValue()` meant exactly for this use case?


https://reviews.llvm.org/D38816





More information about the cfe-commits mailing list