diff options
author | Kazu Hirata <kazu@google.com> | 2025-08-01 00:24:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-01 00:24:40 -0700 |
commit | 228e96b28a84828e1720c387a339a7e68dbdc029 (patch) | |
tree | 7f063cb71bb47392f1dc4c82595bbc87dde0d28d /llvm/lib/IR/DebugInfoMetadata.cpp | |
parent | 666874a4bdbe5b40c101c16e8c772057a28dc866 (diff) | |
download | llvm-228e96b28a84828e1720c387a339a7e68dbdc029.zip llvm-228e96b28a84828e1720c387a339a7e68dbdc029.tar.gz llvm-228e96b28a84828e1720c387a339a7e68dbdc029.tar.bz2 |
[llvm] Use std::make_optional (NFC) (#151627)
std::make_optional<T> is a lot like std::make_unique<T> in that it
performs perfect forwarding of arguments for T's constructor. As a
result, we don't have to repeat type names twice.
Diffstat (limited to 'llvm/lib/IR/DebugInfoMetadata.cpp')
-rw-r--r-- | llvm/lib/IR/DebugInfoMetadata.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/DebugInfoMetadata.cpp b/llvm/lib/IR/DebugInfoMetadata.cpp index f16963d..f1d4549 100644 --- a/llvm/lib/IR/DebugInfoMetadata.cpp +++ b/llvm/lib/IR/DebugInfoMetadata.cpp @@ -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; } |