https://bugs.llvm.org/show_bug.cgi?id=52381
Bug ID: 52381
Summary: Kaleidoscope-Ch4 is not working as expected and is
missing documentation
Product: Documentation
Version: trunk
Hardware: Other
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: General docs
Assignee: unassignedb...@nondot.org
Reporter: yarl-bau...@mailoo.org
CC: llvm-bugs@lists.llvm.org
First, according to the tutorial, we should be able to do
ready> def foo(x) x + 1;
ready> foo(2);
Evaluated to 3.000000
ready> def foo(x) x + 2;
ready> foo(2);
Evaluated to 4.000000
but if I try this (I compiled llvm with examples):
sh-5.1$ ./Kaleidoscope-Ch4
ready> def foo(x) x + 1;
ready> Read function definition:define double @foo(double %x) {
entry:
%addtmp = fadd double %x, 1.000000e+00
ret double %addtmp
}
ready> def foo(x) x + 2;
ready> Read function definition:define double @foo(double %x) {
entry:
%addtmp = fadd double %x, 2.000000e+00
ret double %addtmp
}
Duplicate definition of symbol 'foo'
sh-5.1$
Second, this line
https://github.com/llvm/llvm-project/blob/052a2913f5ced0d266e946f1e697815df1d1fcc0/llvm/examples/Kaleidoscope/Chapter4/toy.cpp#L612
in the full code listing is not present on its corresponding snippet and thus,
not explained.
Thank you!
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs