mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-23 05:29:23 +00:00
This patch refactors a key piece of the Orc APIs: It removes the *::getSymbolAddress and *::lookupSymbolAddressIn methods, which returned target addresses (uint64_ts), and replaces them with *::findSymbol and *::findSymbolIn respectively, which return instances of the new JITSymbol type. Unlike the old methods, calling findSymbol or findSymbolIn does not cause the symbol to be immediately materialized when found. Instead, the symbol will be materialized if/when the getAddress method is called on the returned JITSymbol. This allows us to query for the existence of symbols without actually materializing them. In the future I expect more information to be attached to the JITSymbol class, for example whether the returned symbol is a weak or strong definition. This will allow us to properly handle weak symbols and multiple definitions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228557 91177308-0d34-0410-b5e6-96231b3b80d8
//===----------------------------------------------------------------------===/ // Kaleidoscope with Orc - Initial Version //===----------------------------------------------------------------------===// This version of Kaleidoscope with Orc demonstrates lazy code-generation. Unlike the first Kaleidoscope-Orc tutorial, where code-gen was performed as soon as modules were added to the JIT, this tutorial adds a LazyEmittingLayer to defer code-generation until modules are actually referenced. All IR-generation is still performed up-front. This directory contain a Makefile that allow the code to be built in a standalone manner, independent of the larger LLVM build infrastructure. To build the program you will need to have 'clang++' and 'llvm-config' in your path.