Use cast<T> instead of dyn_cast<T>.
llvm-svn: 205403
diff --git a/lld/lib/Core/Resolver.cpp b/lld/lib/Core/Resolver.cpp
index f7330f6..54b9e8e 100644
--- a/lld/lib/Core/Resolver.cpp
+++ b/lld/lib/Core/Resolver.cpp
@@ -137,7 +137,7 @@
}
void Resolver::handleArchiveFile(const File &file) {
- const ArchiveLibraryFile *archiveFile = dyn_cast<ArchiveLibraryFile>(&file);
+ const ArchiveLibraryFile *archiveFile = cast<ArchiveLibraryFile>(&file);
auto callback = [&](StringRef undefName, bool dataSymbolOnly) {
if (const File *member = archiveFile->find(undefName, dataSymbolOnly)) {
member->setOrdinal(_context.getNextOrdinalAndIncrement());
@@ -151,7 +151,7 @@
void Resolver::handleSharedLibrary(const File &file) {
// Add all the atoms from the shared library
- const SharedLibraryFile *sharedLibrary = dyn_cast<SharedLibraryFile>(&file);
+ const SharedLibraryFile *sharedLibrary = cast<SharedLibraryFile>(&file);
handleFile(*sharedLibrary);
auto callback = [&](StringRef undefName, bool dataSymbolOnly) {