diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2017-02-11 21:26:52 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2017-02-11 21:26:52 +0000 |
commit | bb6805d2632b0737e21a7a8987da9264b62d1452 (patch) | |
tree | d10ae324d2429163cd10423f78c055dacc6fcbb0 /llvm/examples/Kaleidoscope/Chapter2 | |
parent | 315edb0216579960f532d6caa45d20d4ec2eb7af (diff) | |
download | bcm5719-llvm-bb6805d2632b0737e21a7a8987da9264b62d1452.tar.gz bcm5719-llvm-bb6805d2632b0737e21a7a8987da9264b62d1452.zip |
Update Kaleidoscope tutorial and improve Windows support
Many quoted code blocks were not in sync with the actual toy.cpp
files. Improve tutorial text slightly in several places.
Added some step descriptions crucial to avoid crashes (like
InitializeNativeTarget* calls).
Solve/workaround problems with Windows (JIT'ed method not found, using
custom and standard library functions from host process).
Patch by: Moritz Kroll <moritz.kroll@gmx.de>
Differential Revision: https://reviews.llvm.org/D29864
llvm-svn: 294870
Diffstat (limited to 'llvm/examples/Kaleidoscope/Chapter2')
-rw-r--r-- | llvm/examples/Kaleidoscope/Chapter2/toy.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter2/toy.cpp b/llvm/examples/Kaleidoscope/Chapter2/toy.cpp index 8357c5b63fb..4dc917e3f06 100644 --- a/llvm/examples/Kaleidoscope/Chapter2/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter2/toy.cpp @@ -140,6 +140,8 @@ class PrototypeAST { public: PrototypeAST(const std::string &Name, std::vector<std::string> Args) : Name(Name), Args(std::move(Args)) {} + + const std::string &getName() const { return Name; } }; /// FunctionAST - This class represents a function definition itself. |