Skip to content

Commit

Permalink
[lli] Use std::optional in lli.cpp (NFC)
Browse files Browse the repository at this point in the history
This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
  • Loading branch information
kazutakahirata committed Nov 27, 2022
1 parent 4e58c88 commit fc93812
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llvm/tools/lli/lli.cpp
Expand Up @@ -70,6 +70,7 @@
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Instrumentation.h"
#include <cerrno>
#include <optional>

#if !defined(_MSC_VER) && !defined(__MINGW32__)
#include <unistd.h>
Expand Down Expand Up @@ -844,7 +845,7 @@ int runOrcJIT(const char *ProgName) {

// Get TargetTriple and DataLayout from the main module if they're explicitly
// set.
Optional<Triple> TT;
std::optional<Triple> TT;
Optional<DataLayout> DL;
MainModule.withModuleDo([&](Module &M) {
if (!M.getTargetTriple().empty())
Expand Down

0 comments on commit fc93812

Please sign in to comment.