From 1e40dc42cd1bff905323186bc0184f260902f6dd Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Fri, 31 Jul 2015 17:55:53 +0000 Subject: DI: Rewrite the DIBuilder local variable API Replace the general `createLocalVariable()` with two more specific functions: `createParameterVariable()` and `createAutoVariable()`, and rewrite the documentation. Besides cleaning up the API, this avoids exposing the fake DWARF tags `DW_TAG_arg_variable` and `DW_TAG_auto_variable` to frontends, and is preparation for removing them completely. llvm-svn: 243764 --- llvm/docs/tutorial/LangImpl8.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'llvm/docs') 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()); -- cgit v1.2.3