llvm.org GIT mirror llvm / 86e7a05
PR35705: Fix Chapter 9 example code for API changes to DIBuilder git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321214 91177308-0d34-0410-b5e6-96231b3b80d8 David Blaikie 1 year, 7 months ago
3 changed file(s) with 7 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
196196 if (DblTy)
197197 return DblTy;
198198
199 DblTy = DBuilder->createBasicType("double", 64, 64, dwarf::DW_ATE_float);
199 DblTy = DBuilder->createBasicType("double", 64, dwarf::DW_ATE_float);
200200 return DblTy;
201201 }
202202
207207 DBuilder = new DIBuilder(*TheModule);
208208
209209 KSDbgInfo.TheCU = DBuilder->createCompileUnit(
210 dwarf::DW_LANG_C, "fib.ks", ".", "Kaleidoscope Compiler", 0, "", 0);
210 dwarf::DW_LANG_C, DBuilder->createFile("fib.ks", "."),
211 "Kaleidoscope Compiler", 0, "", 0);
211212
212213 There are a couple of things to note here. First, while we're producing a
213214 compile unit for a language called Kaleidoscope we used the language
1313 add_subdirectory(Chapter6)
1414 add_subdirectory(Chapter7)
1515 add_subdirectory(Chapter8)
16 add_subdirectory(Chapter9)
822822 if (DblTy)
823823 return DblTy;
824824
825 DblTy = DBuilder->createBasicType("double", 64, 64, dwarf::DW_ATE_float);
825 DblTy = DBuilder->createBasicType("double", 64, dwarf::DW_ATE_float);
826826 return DblTy;
827827 }
828828
14351435 // Currently down as "fib.ks" as a filename since we're redirecting stdin
14361436 // but we'd like actual source locations.
14371437 KSDbgInfo.TheCU = DBuilder->createCompileUnit(
1438 dwarf::DW_LANG_C, "fib.ks", ".", "Kaleidoscope Compiler", 0, "", 0);
1438 dwarf::DW_LANG_C, DBuilder->createFile("fib.ks", "."),
1439 "Kaleidoscope Compiler", 0, "", 0);
14391440
14401441 // Run the main "interpreter loop" now.
14411442 MainLoop();