r203124 - [ASTPrinter] 'SEL' isn't a ObjCObjectPointer, so we don't need to handle it in TypePrinter::printObjCObjectPointerBefore.

Argyrios Kyrtzidis akyrtzi at gmail.com
Thu Mar 6 07:31:56 PST 2014


Author: akirtzidis
Date: Thu Mar  6 09:31:56 2014
New Revision: 203124

URL: http://llvm.org/viewvc/llvm-project?rev=203124&view=rev
Log:
[ASTPrinter] 'SEL' isn't a ObjCObjectPointer, so we don't need to handle it in TypePrinter::printObjCObjectPointerBefore.

Suggested by Jordan.

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=203124&r1=203123&r2=203124&view=diff
==============================================================================
--- cfe/trunk/lib/AST/TypePrinter.cpp (original)
+++ cfe/trunk/lib/AST/TypePrinter.cpp Thu Mar  6 09:31:56 2014
@@ -1281,12 +1281,12 @@ void TypePrinter::printObjCObjectPointer
   T->getPointeeType().getLocalQualifiers().print(OS, Policy,
                                                 /*appendSpaceIfNonEmpty=*/true);
 
+  assert(!T->isObjCSelType());
+
   if (T->isObjCIdType() || T->isObjCQualifiedIdType())
     OS << "id";
   else if (T->isObjCClassType() || T->isObjCQualifiedClassType())
     OS << "Class";
-  else if (T->isObjCSelType())
-    OS << "SEL";
   else
     OS << T->getInterfaceDecl()->getName();
   
@@ -1303,8 +1303,7 @@ void TypePrinter::printObjCObjectPointer
   }
   
   if (!T->isObjCIdType() && !T->isObjCQualifiedIdType() &&
-      !T->isObjCClassType() && !T->isObjCQualifiedClassType() &&
-      !T->isObjCSelType()) {
+      !T->isObjCClassType() && !T->isObjCQualifiedClassType()) {
     OS << " *"; // Don't forget the implicit pointer.
   } else {
     spaceBeforePlaceHolder(OS);





More information about the cfe-commits mailing list