diff options
author | David Blaikie <dblaikie@gmail.com> | 2017-12-20 19:36:54 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2017-12-20 19:36:54 +0000 |
commit | 870bbdb90bd4db395407ba95844dabcfc8e66a2e (patch) | |
tree | 1db6573f1f83ba500ea0a43865d71baf16b1c413 /llvm/docs/tutorial | |
parent | 8ec5632521e7e60b825440a6fad5d077316e0ba7 (diff) | |
download | bcm5719-llvm-870bbdb90bd4db395407ba95844dabcfc8e66a2e.tar.gz bcm5719-llvm-870bbdb90bd4db395407ba95844dabcfc8e66a2e.zip |
PR35705: Fix Chapter 9 example code for API changes to DIBuilder
llvm-svn: 321214
Diffstat (limited to 'llvm/docs/tutorial')
-rw-r--r-- | llvm/docs/tutorial/LangImpl09.rst | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/docs/tutorial/LangImpl09.rst b/llvm/docs/tutorial/LangImpl09.rst index fe5a95a5769..d81f9fa0001 100644 --- a/llvm/docs/tutorial/LangImpl09.rst +++ b/llvm/docs/tutorial/LangImpl09.rst @@ -197,7 +197,7 @@ expressions: if (DblTy) return DblTy; - DblTy = DBuilder->createBasicType("double", 64, 64, dwarf::DW_ATE_float); + DblTy = DBuilder->createBasicType("double", 64, dwarf::DW_ATE_float); return DblTy; } @@ -208,7 +208,8 @@ And then later on in ``main`` when we're constructing our module: DBuilder = new DIBuilder(*TheModule); KSDbgInfo.TheCU = DBuilder->createCompileUnit( - dwarf::DW_LANG_C, "fib.ks", ".", "Kaleidoscope Compiler", 0, "", 0); + dwarf::DW_LANG_C, DBuilder->createFile("fib.ks", "."), + "Kaleidoscope Compiler", 0, "", 0); There are a couple of things to note here. First, while we're producing a compile unit for a language called Kaleidoscope we used the language |