[lld] f1027e4 - [lld] std::optional::value => operator*/operator->
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 16 19:19:53 PST 2022
Author: Fangrui Song
Date: 2022-12-17T03:19:47Z
New Revision: f1027e466b3c7a90daef77bfd5b60bfb40694757
URL: https://github.com/llvm/llvm-project/commit/f1027e466b3c7a90daef77bfd5b60bfb40694757
DIFF: https://github.com/llvm/llvm-project/commit/f1027e466b3c7a90daef77bfd5b60bfb40694757.diff
LOG: [lld] std::optional::value => operator*/operator->
Added:
Modified:
lld/ELF/InputFiles.cpp
lld/MachO/SectionPriorities.cpp
Removed:
################################################################################
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index aafef65b054da..9ecc8982cbc0c 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -149,7 +149,7 @@ static void updateSupportedARMFeatures(const ARMAttributeParser &attributes) {
attributes.getAttributeValue(ARMBuildAttrs::CPU_arch);
if (!attr)
return;
- auto arch = attr.value();
+ auto arch = *attr;
switch (arch) {
case ARMBuildAttrs::Pre_v4:
case ARMBuildAttrs::v4:
diff --git a/lld/MachO/SectionPriorities.cpp b/lld/MachO/SectionPriorities.cpp
index 21598f088e0f1..976ea03980e96 100644
--- a/lld/MachO/SectionPriorities.cpp
+++ b/lld/MachO/SectionPriorities.cpp
@@ -371,7 +371,7 @@ macho::PriorityBuilder::buildInputSectionPriorities() {
if (!symbolPriority)
return;
size_t &priority = sectionPriorities[sym->isec];
- priority = std::max(priority, symbolPriority.value());
+ priority = std::max(priority, *symbolPriority);
};
// TODO: Make sure this handles weak symbols correctly.
More information about the llvm-commits
mailing list