@@ -943,44 +943,41 @@ void ClangASTImporter::ASTImporterDelegate::ImportDefinitionTo(
943
943
// the class was originally sourced from symbols.
944
944
945
945
if (ObjCInterfaceDecl *to_objc_interface = dyn_cast<ObjCInterfaceDecl>(to)) {
946
- do {
947
- ObjCInterfaceDecl *to_superclass = to_objc_interface->getSuperClass ();
946
+ ObjCInterfaceDecl *to_superclass = to_objc_interface->getSuperClass ();
948
947
949
- if (to_superclass)
950
- break ; // we're not going to override it if it's set
948
+ if (to_superclass)
949
+ return ; // we're not going to override it if it's set
951
950
952
- ObjCInterfaceDecl *from_objc_interface =
953
- dyn_cast<ObjCInterfaceDecl>(from);
951
+ ObjCInterfaceDecl *from_objc_interface = dyn_cast<ObjCInterfaceDecl>(from);
954
952
955
- if (!from_objc_interface)
956
- break ;
953
+ if (!from_objc_interface)
954
+ return ;
957
955
958
- ObjCInterfaceDecl *from_superclass = from_objc_interface->getSuperClass ();
956
+ ObjCInterfaceDecl *from_superclass = from_objc_interface->getSuperClass ();
959
957
960
- if (!from_superclass)
961
- break ;
958
+ if (!from_superclass)
959
+ return ;
962
960
963
- llvm::Expected<Decl *> imported_from_superclass_decl =
964
- Import (from_superclass);
961
+ llvm::Expected<Decl *> imported_from_superclass_decl =
962
+ Import (from_superclass);
965
963
966
- if (!imported_from_superclass_decl) {
967
- LLDB_LOG_ERROR (log, imported_from_superclass_decl.takeError (),
968
- " Couldn't import decl: {0}" );
969
- break ;
970
- }
964
+ if (!imported_from_superclass_decl) {
965
+ LLDB_LOG_ERROR (log, imported_from_superclass_decl.takeError (),
966
+ " Couldn't import decl: {0}" );
967
+ return ;
968
+ }
971
969
972
- ObjCInterfaceDecl *imported_from_superclass =
973
- dyn_cast<ObjCInterfaceDecl>(*imported_from_superclass_decl);
970
+ ObjCInterfaceDecl *imported_from_superclass =
971
+ dyn_cast<ObjCInterfaceDecl>(*imported_from_superclass_decl);
974
972
975
- if (!imported_from_superclass)
976
- break ;
973
+ if (!imported_from_superclass)
974
+ return ;
977
975
978
- if (!to_objc_interface->hasDefinition ())
979
- to_objc_interface->startDefinition ();
976
+ if (!to_objc_interface->hasDefinition ())
977
+ to_objc_interface->startDefinition ();
980
978
981
- to_objc_interface->setSuperClass (m_source_ctx->getTrivialTypeSourceInfo (
982
- m_source_ctx->getObjCInterfaceType (imported_from_superclass)));
983
- } while (false );
979
+ to_objc_interface->setSuperClass (m_source_ctx->getTrivialTypeSourceInfo (
980
+ m_source_ctx->getObjCInterfaceType (imported_from_superclass)));
984
981
}
985
982
}
986
983
0 commit comments