From 63c007dc3f163cd9b0b5c99108fed562aa7714fb Mon Sep 17 00:00:00 2001 From: aidint <3762928+aidint@users.noreply.github.com> Date: Sun, 6 Oct 2024 13:14:28 +0200 Subject: [PATCH] fix discrepancies between code and documentation --- llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl03.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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");