[llvm] r321214 - PR35705: Fix Chapter 9 example code for API changes to DIBuilder
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 20 13:09:01 PST 2017
Chapter9 was specifically missing from the parent directory's
CMakeLists.txt - so it wouldn't be caught by any builder. Hopefully that's
addressed now.
On Wed, Dec 20, 2017 at 1:05 PM Robinson, Paul <paul.robinson at sony.com>
wrote:
> Is there a bot that builds the examples? It would obviously
> be nice to catch this kind of thing when it happens.
> --paulr
>
> > -----Original Message-----
> > From: llvm-commits [mailto:llvm-commits-bounces at lists.llvm.org] On
> Behalf
> > Of David Blaikie via llvm-commits
> > Sent: Wednesday, December 20, 2017 11:37 AM
> > To: llvm-commits at lists.llvm.org
> > Subject: [llvm] r321214 - PR35705: Fix Chapter 9 example code for API
> > changes to DIBuilder
> >
> > Author: dblaikie
> > Date: Wed Dec 20 11:36:54 2017
> > New Revision: 321214
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=321214&view=rev
> > Log:
> > PR35705: Fix Chapter 9 example code for API changes to DIBuilder
> >
> > Modified:
> > llvm/trunk/docs/tutorial/LangImpl09.rst
> > llvm/trunk/examples/Kaleidoscope/CMakeLists.txt
> > llvm/trunk/examples/Kaleidoscope/Chapter9/toy.cpp
> >
> > Modified: llvm/trunk/docs/tutorial/LangImpl09.rst
> > URL: http://llvm.org/viewvc/llvm-
> >
> project/llvm/trunk/docs/tutorial/LangImpl09.rst?rev=321214&r1=321213&r2=32
> > 1214&view=diff
> >
> ==========================================================================
> > ====
> > --- llvm/trunk/docs/tutorial/LangImpl09.rst (original)
> > +++ llvm/trunk/docs/tutorial/LangImpl09.rst Wed Dec 20 11:36:54 2017
> > @@ -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
> > 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
> >
> > Modified: llvm/trunk/examples/Kaleidoscope/CMakeLists.txt
> > URL: http://llvm.org/viewvc/llvm-
> >
> project/llvm/trunk/examples/Kaleidoscope/CMakeLists.txt?rev=321214&r1=3212
> > 13&r2=321214&view=diff
> >
> ==========================================================================
> > ====
> > --- llvm/trunk/examples/Kaleidoscope/CMakeLists.txt (original)
> > +++ llvm/trunk/examples/Kaleidoscope/CMakeLists.txt Wed Dec 20 11:36:54
> > 2017
> > @@ -14,3 +14,4 @@ add_subdirectory(Chapter5)
> > add_subdirectory(Chapter6)
> > add_subdirectory(Chapter7)
> > add_subdirectory(Chapter8)
> > +add_subdirectory(Chapter9)
> >
> > Modified: llvm/trunk/examples/Kaleidoscope/Chapter9/toy.cpp
> > URL: http://llvm.org/viewvc/llvm-
> >
> project/llvm/trunk/examples/Kaleidoscope/Chapter9/toy.cpp?rev=321214&r1=32
> > 1213&r2=321214&view=diff
> >
> ==========================================================================
> > ====
> > --- llvm/trunk/examples/Kaleidoscope/Chapter9/toy.cpp (original)
> > +++ llvm/trunk/examples/Kaleidoscope/Chapter9/toy.cpp Wed Dec 20 11:36:54
> > 2017
> > @@ -823,7 +823,7 @@ DIType *DebugInfo::getDoubleTy() {
> > 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;
> > }
> >
> > @@ -1436,7 +1436,8 @@ int main() {
> > // Currently down as "fib.ks" as a filename since we're redirecting
> > stdin
> > // but we'd like actual source locations.
> > 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);
> >
> > // Run the main "interpreter loop" now.
> > MainLoop();
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171220/d228c454/attachment-0001.html>
More information about the llvm-commits
mailing list