diff --git a/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl03.rst b/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl03.rst index 2f3f688406212..f41c5ed0ad0cd 100644 --- a/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl03.rst +++ b/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl03.rst @@ -74,7 +74,7 @@ parser, which will be used to report errors found during code generation .. code-block:: c++ static std::unique_ptr TheContext; - static std::unique_ptr> Builder(TheContext); + static std::unique_ptr> Builder; static std::unique_ptr TheModule; static std::map NamedValues; @@ -171,7 +171,7 @@ variables `_. case '<': L = Builder->CreateFCmpULT(L, R, "cmptmp"); // Convert bool 0/1 to double 0.0 or 1.0 - return Builder->CreateUIToFP(L, Type::getDoubleTy(TheContext), + return Builder->CreateUIToFP(L, Type::getDoubleTy(*TheContext), "booltmp"); default: return LogErrorV("invalid binary operator");