summaryrefslogtreecommitdiffstats
path: root/llvm/docs/tutorial/LangImpl8.rst
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/docs/tutorial/LangImpl8.rst')
-rw-r--r--llvm/docs/tutorial/LangImpl8.rst5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/docs/tutorial/LangImpl8.rst b/llvm/docs/tutorial/LangImpl8.rst
index 88224bb92f0..24c4d171f85 100644
--- a/llvm/docs/tutorial/LangImpl8.rst
+++ b/llvm/docs/tutorial/LangImpl8.rst
@@ -395,9 +395,8 @@ argument allocas in ``PrototypeAST::CreateArgumentAllocas``.
DIScope *Scope = KSDbgInfo.LexicalBlocks.back();
DIFile *Unit = DBuilder->createFile(KSDbgInfo.TheCU.getFilename(),
KSDbgInfo.TheCU.getDirectory());
- DILocalVariable D = DBuilder->createLocalVariable(
- dwarf::DW_TAG_arg_variable, Scope, Args[Idx], Unit, Line,
- KSDbgInfo.getDoubleTy(), true, 0, Idx + 1);
+ DILocalVariable D = DBuilder->createParameterVariable(
+ Scope, Args[Idx], Idx + 1, Unit, Line, KSDbgInfo.getDoubleTy(), true);
Instruction *Call = DBuilder->insertDeclare(
Alloca, D, DBuilder->createExpression(), Builder.GetInsertBlock());
OpenPOWER on IntegriCloud