Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/include/llvm/Transforms/IPO/Attributor.h
Original file line number Diff line number Diff line change
Expand Up @@ -6494,7 +6494,7 @@ struct AAAllocationInfo : public StateWrapper<BooleanState, AbstractAttribute> {
}

constexpr static const std::optional<TypeSize> HasNoAllocationSize =
std::optional<TypeSize>(TypeSize(-1, true));
std::make_optional<TypeSize>(-1, true);

LLVM_ABI static const char ID;
};
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/IR/DebugInfoMetadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ DIDerivedType *DIDerivedType::getImpl(
std::optional<DIDerivedType::PtrAuthData>
DIDerivedType::getPtrAuthData() const {
return getTag() == dwarf::DW_TAG_LLVM_ptrauth_type
? std::optional<PtrAuthData>(PtrAuthData(SubclassData32))
? std::make_optional<PtrAuthData>(SubclassData32)
: std::nullopt;
}

Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Remarks/RemarkLinker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ Error RemarkLinker::link(StringRef Buffer, Format RemarkFormat) {
Expected<std::unique_ptr<RemarkParser>> MaybeParser =
createRemarkParserFromMeta(
RemarkFormat, Buffer,
PrependPath ? std::optional<StringRef>(StringRef(*PrependPath))
: std::optional<StringRef>());
PrependPath ? std::make_optional<StringRef>(*PrependPath)
: std::nullopt);
if (!MaybeParser)
return MaybeParser.takeError();

Expand Down
5 changes: 2 additions & 3 deletions llvm/lib/Transforms/IPO/AttributorAttributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13404,7 +13404,7 @@ struct AAAllocationInfoImpl : public AAAllocationInfo {
return indicatePessimisticFixpoint();

if (BinSize == 0) {
auto NewAllocationSize = std::optional<TypeSize>(TypeSize(0, false));
auto NewAllocationSize = std::make_optional<TypeSize>(0, false);
if (!changeAllocationSize(NewAllocationSize))
return ChangeStatus::UNCHANGED;
return ChangeStatus::CHANGED;
Expand All @@ -13422,8 +13422,7 @@ struct AAAllocationInfoImpl : public AAAllocationInfo {
if (SizeOfBin >= *AllocationSize)
return indicatePessimisticFixpoint();

auto NewAllocationSize =
std::optional<TypeSize>(TypeSize(SizeOfBin * 8, false));
auto NewAllocationSize = std::make_optional<TypeSize>(SizeOfBin * 8, false);

if (!changeAllocationSize(NewAllocationSize))
return ChangeStatus::UNCHANGED;
Expand Down