aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Instructions.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-06-20 22:45:45 -0700
committerKazu Hirata <kazu@google.com>2022-06-20 22:45:45 -0700
commit7a47ee51a145a40332311330ef45b5d62d8ae023 (patch)
tree2e7ac16bc8430595cbe68692d08111f028b5f995 /llvm/lib/IR/Instructions.cpp
parent9cfbe7bbfea762d72b60c51c8ab5dadf6b317a9a (diff)
downloadllvm-7a47ee51a145a40332311330ef45b5d62d8ae023.zip
llvm-7a47ee51a145a40332311330ef45b5d62d8ae023.tar.gz
llvm-7a47ee51a145a40332311330ef45b5d62d8ae023.tar.bz2
[llvm] Don't use Optional::getValue (NFC)
Diffstat (limited to 'llvm/lib/IR/Instructions.cpp')
-rw-r--r--llvm/lib/IR/Instructions.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp
index 5efd608..22e8ca7 100644
--- a/llvm/lib/IR/Instructions.cpp
+++ b/llvm/lib/IR/Instructions.cpp
@@ -4497,7 +4497,7 @@ SwitchInstProfUpdateWrapper::CaseWeightOpt
SwitchInstProfUpdateWrapper::getSuccessorWeight(unsigned idx) {
if (!Weights)
return None;
- return Weights.getValue()[idx];
+ return (*Weights)[idx];
}
void SwitchInstProfUpdateWrapper::setSuccessorWeight(
@@ -4509,7 +4509,7 @@ void SwitchInstProfUpdateWrapper::setSuccessorWeight(
Weights = SmallVector<uint32_t, 8>(SI.getNumSuccessors(), 0);
if (Weights) {
- auto &OldW = Weights.getValue()[idx];
+ auto &OldW = (*Weights)[idx];
if (*W != OldW) {
Changed = true;
OldW = *W;