Skip to content

Commit 8df6637

Browse files
authored
[doc] Fix Kaleidoscope tutorial chapter 3 code snippet and full listing discrepancies (#111289)
Fix two discrepancies between the cited snippets and the full code.
1 parent 88478a8 commit 8df6637

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl03.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ parser, which will be used to report errors found during code generation
7474
.. code-block:: c++
7575

7676
static std::unique_ptr<LLVMContext> TheContext;
77-
static std::unique_ptr<IRBuilder<>> Builder(TheContext);
77+
static std::unique_ptr<IRBuilder<>> Builder;
7878
static std::unique_ptr<Module> TheModule;
7979
static std::map<std::string, Value *> NamedValues;
8080
@@ -171,7 +171,7 @@ variables <LangImpl07.html#user-defined-local-variables>`_.
171171
case '<':
172172
L = Builder->CreateFCmpULT(L, R, "cmptmp");
173173
// Convert bool 0/1 to double 0.0 or 1.0
174-
return Builder->CreateUIToFP(L, Type::getDoubleTy(TheContext),
174+
return Builder->CreateUIToFP(L, Type::getDoubleTy(*TheContext),
175175
"booltmp");
176176
default:
177177
return LogErrorV("invalid binary operator");

0 commit comments

Comments
 (0)