[cfe-commits] r61231 - /cfe/trunk/lib/AST/ASTContext.cpp
Fariborz Jahanian
fjahanian at apple.com
Thu Dec 18 16:14:50 PST 2008
Author: fjahanian
Date: Thu Dec 18 18:14:49 2008
New Revision: 61231
URL: http://llvm.org/viewvc/llvm-project?rev=61231&view=rev
Log:
Several at encode bug fixes for ObjC.
Modified:
cfe/trunk/lib/AST/ASTContext.cpp
Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=61231&r1=61230&r2=61231&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Thu Dec 18 18:14:49 2008
@@ -1779,9 +1779,17 @@
}
else if (const PointerType *PT = T->getAsPointerType()) {
QualType PointeeTy = PT->getPointeeType();
- if (isObjCIdType(PointeeTy) || PointeeTy->isObjCInterfaceType()) {
+ if (isObjCIdType(PointeeTy)) {
S += '@';
return;
+ }
+ else if (PointeeTy->isObjCInterfaceType()) {
+ S += '@';
+ ObjCInterfaceDecl *OI = PointeeTy->getAsObjCInterfaceType()->getDecl();
+ S += '"';
+ S += OI->getNameAsCString();
+ S += '"';
+ return;
} else if (isObjCClassType(PointeeTy)) {
S += '#';
return;
@@ -1802,7 +1810,7 @@
S += '^';
getObjCEncodingForTypeImpl(PT->getPointeeType(), S,
false, ExpandPointedToStructures,
- NameFields);
+ false);
} else if (const ArrayType *AT =
// Ignore type qualifiers etc.
dyn_cast<ArrayType>(T->getCanonicalTypeInternal())) {
More information about the cfe-commits
mailing list