Skip to content

Commit fdc9509

Browse files
committed
Added warning about outdated feature into Kaleidoscope tutorial text
**Motivation: ** I have been studying LLVM with LLVM Kaleidoscope tutorial. In the 4th part I faced an error which said that I can't redefine a function as shown in the tutorial. After hours of searching, I finally found the reason that produced the error is that the feature of symbols redefinition has been disabled since LLVM-9. There was no information about that in the tutorial's text, so I've decided to add a warning. **Changes**: The only file I fixed is "`llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl04.rst`", I added text warning which says that described feature is outdated and the described functionality will not work properly on LLVM versions older 8 one. Patch by : DKay7 Differential Revision: https://reviews.llvm.org/D130613
1 parent ba0407b commit fdc9509

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl04.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,11 @@ In HandleDefinition, we add two lines to transfer the newly defined function to
522522
the JIT and open a new module. In HandleExtern, we just need to add one line to
523523
add the prototype to FunctionProtos.
524524

525+
.. warning::
526+
Duplication of symbols in separate modules is not allowed since LLVM-9. That means you can not redefine function in your Kaleidoscope as its shown below. Just skip this part.
527+
528+
The reason is that the newer OrcV2 JIT APIs are trying to stay very close to the static and dynamic linker rules, including rejecting duplicate symbols. Requiring symbol names to be unique allows us to support concurrent compilation for symbols using the (unique) symbol names as keys for tracking.
529+
525530
With these changes made, let's try our REPL again (I removed the dump of the
526531
anonymous functions this time, you should get the idea by now :) :
527532

0 commit comments

Comments
 (0)