diff --git a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp --- a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp @@ -30,6 +30,7 @@ #include #include #include +#include using namespace llvm; using namespace llvm::sys; @@ -1243,7 +1244,7 @@ auto Features = ""; TargetOptions opt; - auto RM = Optional(); + std::optional RM; auto TheTargetMachine = Target->createTargetMachine(TargetTriple, CPU, Features, opt, RM);