summaryrefslogtreecommitdiffstats
path: root/llvm/docs/tutorial
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-07-31 17:55:53 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-07-31 17:55:53 +0000
commit1e40dc42cd1bff905323186bc0184f260902f6dd (patch)
treea9edccf44043fa3f00b4749d6d818f0db364f556 /llvm/docs/tutorial
parent600aee98057e8657140713cd2a0dd6e5ff0247b8 (diff)
downloadbcm5719-llvm-1e40dc42cd1bff905323186bc0184f260902f6dd.tar.gz
bcm5719-llvm-1e40dc42cd1bff905323186bc0184f260902f6dd.zip
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
Diffstat (limited to 'llvm/docs/tutorial')
-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