break;
case OPT_weak_library: {
auto *dylibFile = dyn_cast_or_null<DylibFile>(addFile(arg->getValue()));
- if (dylibFile != nullptr)
+ if (dylibFile)
dylibFile->forceWeakImport = true;
break;
}
StringRef name = arg->getValue();
if (Optional<std::string> path = findLibrary(name)) {
auto *dylibFile = dyn_cast_or_null<DylibFile>(addFile(*path));
- if (opt.getID() == OPT_weak_l && dylibFile != nullptr)
+ if (opt.getID() == OPT_weak_l && dylibFile)
dylibFile->forceWeakImport = true;
break;
}
StringRef name = arg->getValue();
if (Optional<std::string> path = findFramework(name)) {
auto *dylibFile = dyn_cast_or_null<DylibFile>(addFile(*path));
- if (opt.getID() == OPT_weak_framework && dylibFile != nullptr)
+ if (opt.getID() == OPT_weak_framework && dylibFile)
dylibFile->forceWeakImport = true;
break;
}
// TODO: Expand @loader_path, @executable_path etc
- if (currentTopLevelTapi != nullptr) {
+ if (currentTopLevelTapi) {
for (InterfaceFile &child :
make_pointee_range(currentTopLevelTapi->documents())) {
if (path == child.getInstallName())