[Bitcode] Use std::nullopt instead of None (NFC)
This patch mechanically replaces None with std::nullopt where the compiler would warn if None were deprecated. The intent is to reduce the amount of manual work required in migrating from Optional to std::optional. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
This commit is contained in:
@@ -528,7 +528,7 @@ private:
|
||||
Optional<unsigned> getValueId(GlobalValue::GUID ValGUID) {
|
||||
auto VMI = GUIDToValueIdMap.find(ValGUID);
|
||||
if (VMI == GUIDToValueIdMap.end())
|
||||
return None;
|
||||
return std::nullopt;
|
||||
return VMI->second;
|
||||
}
|
||||
|
||||
@@ -4431,7 +4431,7 @@ void IndexBitcodeWriter::writeCombinedGlobalValueSummary() {
|
||||
|
||||
auto GetValueId = [&](const ValueInfo &VI) -> Optional<unsigned> {
|
||||
if (!VI)
|
||||
return None;
|
||||
return std::nullopt;
|
||||
return getValueId(VI.getGUID());
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user