Skip to content

Commit ff9b7ea

Browse files
committed
Perfrom miscellaneous cleanups in DWARFImporter.cpp
1 parent c3b98ef commit ff9b7ea

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/ClangImporter/DWARFImporter.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ void ClangImporter::Implementation::lookupValueDWARF(
136136
return;
137137

138138
SmallVector<clang::Decl *, 4> decls;
139-
DWARFImporter->lookupValue(name.getBaseIdentifier().str(), llvm::None, decls);
139+
DWARFImporter->lookupValue(name.getBaseIdentifier().str(), None, decls);
140140
for (auto *clangDecl : decls) {
141-
auto *namedDecl = dyn_cast_or_null<clang::NamedDecl>(clangDecl);
141+
auto *namedDecl = dyn_cast<clang::NamedDecl>(clangDecl);
142142
if (!namedDecl)
143143
continue;
144144
auto *swiftDecl = cast_or_null<ValueDecl>(
@@ -166,9 +166,7 @@ void ClangImporter::Implementation::lookupTypeDeclDWARF(
166166
!isa<clang::ObjCCompatibleAliasDecl>(clangDecl)) {
167167
continue;
168168
}
169-
auto *namedDecl = dyn_cast_or_null<clang::NamedDecl>(clangDecl);
170-
if (!namedDecl)
171-
continue;
169+
auto *namedDecl = cast<clang::NamedDecl>(clangDecl);
172170
Decl *importedDecl = cast_or_null<ValueDecl>(
173171
importDeclReal(namedDecl->getMostRecentDecl(), CurrentVersion));
174172

0 commit comments

Comments
 (0)