aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-sim/llvm-sim.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-06-25 11:55:57 -0700
committerKazu Hirata <kazu@google.com>2022-06-25 11:55:57 -0700
commitaa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d (patch)
treed207b35cfb445636f41204bcfe51f6ca3a94a3ba /llvm/tools/llvm-sim/llvm-sim.cpp
parentb8df4093e4d82c67a419911a46b63482043643e5 (diff)
downloadllvm-aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.zip
llvm-aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.tar.gz
llvm-aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.tar.bz2
Don't use Optional::hasValue (NFC)
Diffstat (limited to 'llvm/tools/llvm-sim/llvm-sim.cpp')
-rw-r--r--llvm/tools/llvm-sim/llvm-sim.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/tools/llvm-sim/llvm-sim.cpp b/llvm/tools/llvm-sim/llvm-sim.cpp
index 26e370f..2b717d7 100644
--- a/llvm/tools/llvm-sim/llvm-sim.cpp
+++ b/llvm/tools/llvm-sim/llvm-sim.cpp
@@ -85,14 +85,13 @@ exportToFile(const StringRef FilePath,
Optional<unsigned> End =
getPositionInModule((*C.back()).Inst, LLVMInstNum);
- assert(Start.hasValue() &&
+ assert(Start &&
"Could not find instruction number for first instruction");
- assert(End.hasValue() &&
- "Could not find instruction number for last instruction");
+ assert(End && "Could not find instruction number for last instruction");
J.object([&] {
- J.attribute("start", Start.getValue());
- J.attribute("end", End.getValue());
+ J.attribute("start", Start.value());
+ J.attribute("end", End.value());
});
}
J.arrayEnd();