forked from OSchip/llvm-project
PR35705: Fix Chapter 9 example code for API changes to DIBuilder
llvm-svn: 321214
This commit is contained in:
parent
8ec5632521
commit
870bbdb90b
llvm
|
@ -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
|
||||
|
|
|
@ -14,3 +14,4 @@ add_subdirectory(Chapter5)
|
|||
add_subdirectory(Chapter6)
|
||||
add_subdirectory(Chapter7)
|
||||
add_subdirectory(Chapter8)
|
||||
add_subdirectory(Chapter9)
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue