ObjectiveC objc_bridge. Minor refactoring.

// rdar://15454846

llvm-svn: 195070
This commit is contained in:
Fariborz Jahanian 2013-11-19 01:38:23 +00:00
parent 3311f374a8
commit dae5ec5915
1 changed files with 2 additions and 2 deletions

View File

@ -3170,8 +3170,8 @@ static inline ObjCBridgeAttr *getObjCBridgeAttr(const TypedefType *TD) {
QualType QT = TDNDecl->getUnderlyingType();
if (QT->isPointerType()) {
QT = QT->getPointeeType();
if (QT->isStructureType() || QT->isUnionType() || QT->isClassType())
if (RecordDecl *RD = QT->getAs<RecordType>()->getDecl())
if (const RecordType *RT = QT->getAs<RecordType>())
if (RecordDecl *RD = RT->getDecl())
if (RD->hasAttr<ObjCBridgeAttr>())
return RD->getAttr<ObjCBridgeAttr>();
}