MSVC: litter the code with llvm_unreachable (NFC)

Add `llvm_unreachable` to mark covered switches which MSVC does not
analyze correctly and believes that there exists a path through the
function without a return value.
This commit is contained in:
Saleem Abdulrasool
2019-06-01 19:02:46 -07:00
parent b8276f8ac7
commit 731c31f9a5
28 changed files with 53 additions and 0 deletions

View File

@@ -230,6 +230,7 @@ void SerializedModuleLoaderBase::collectVisibleTopLevelModuleNamesImpl(
return None;
}
}
llvm_unreachable("covered switch");
});
}
@@ -474,6 +475,7 @@ SerializedModuleLoaderBase::findModule(AccessPathElem moduleID,
return findTargetSpecificModuleFiles();
}
}
llvm_unreachable("covered switch");
});
return result.getValueOr(false);
}