Kaleidoscope
Kaleidoscope copied to clipboard
Simple programming language written in Swift and compiled with LLVM
Kaleidoscope
This is an implementation of (some of) the language from the LLVM Kaleidoscope tutorial.
The project itself does its parsing with KaleidoscopeLang and codegen using LLVM.swift.
Getting it running
-
Build LLVM (currently tested with 3.6.2). Homebrew is the easiest way to do this:
brew install llvm -
Clone the repository and its submodules
-
In
Carthage/Checkouts/LLVM/LLVM.xcconfig, setLLVM_PREFIXto be the prefix used when buildingLLVM. For homebrew this will typically be/usr/local/Cellar/llvm/3.6.2, for you it may be/usr/localor similar depending on your setup. -
Open
Kaleidoscope.xcworkspaceand run it!