aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShivam Gupta <shivam98.tkg@gmail.com>2022-08-06 13:22:42 +0530
committerShivam Gupta <shivam98.tkg@gmail.com>2022-08-07 14:37:05 +0530
commitfdc950958ed0970159071cc4367a66149971586f (patch)
tree433f85193d7d25008c9f3950b314c7d032a657fb
parentba0407ba86d0a87f01e1a676f9dc23bae3e9c169 (diff)
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
-rw-r--r--llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl04.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl04.rst b/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl04.rst
index 98ff8711b1ac..7975ebf8e581 100644
--- a/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl04.rst
+++ b/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl04.rst
@@ -522,6 +522,11 @@ In HandleDefinition, we add two lines to transfer the newly defined function to
the JIT and open a new module. In HandleExtern, we just need to add one line to
add the prototype to FunctionProtos.
+.. warning::
+ 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.
+
+ 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.
+
With these changes made, let's try our REPL again (I removed the dump of the
anonymous functions this time, you should get the idea by now :) :