From: Fangrui Song Date: Fri, 29 Jul 2022 08:15:23 +0000 (-0700) Subject: [bolt] Replace Optional::getValue with value or operator*. NFC X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=999514bb9ae1e0125d2a778abaec1b8dac6d3e6f;p=platform%2Fupstream%2Fllvm.git [bolt] Replace Optional::getValue with value or operator*. NFC --- diff --git a/bolt/lib/Rewrite/DWARFRewriter.cpp b/bolt/lib/Rewrite/DWARFRewriter.cpp index da97790..3466f5c 100644 --- a/bolt/lib/Rewrite/DWARFRewriter.cpp +++ b/bolt/lib/Rewrite/DWARFRewriter.cpp @@ -516,8 +516,8 @@ void DWARFRewriter::updateUnitDebugInfo( if (Value.isFormClass(DWARFFormValue::FC_Constant) || Value.isFormClass(DWARFFormValue::FC_SectionOffset)) { uint64_t Offset = Value.isFormClass(DWARFFormValue::FC_Constant) - ? Value.getAsUnsignedConstant().getValue() - : Value.getAsSectionOffset().getValue(); + ? Value.getAsUnsignedConstant().value() + : Value.getAsSectionOffset().value(); DebugLocationsVector InputLL; Optional SectionAddress = @@ -674,7 +674,7 @@ void DWARFRewriter::updateUnitDebugInfo( Value = AttrVal->V; const Optional Result = Value.getAsAddress(); if (Result.hasValue()) { - const uint64_t Address = Result.getValue(); + const uint64_t Address = *Result; uint64_t NewAddress = 0; if (const BinaryFunction *Function = BC.getBinaryFunctionContainingAddress(Address)) {