1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[Kaleidoscope][BuildingAJIT] Fix code-blocks in Chapter 2.

llvm-svn: 271867
This commit is contained in:
Lang Hames 2016-06-06 04:53:59 +00:00
parent 6c7de226cb
commit 8b961a44c2

View File

@ -48,7 +48,7 @@ constructor for this layer takes a reference to the layer below (as all layers
do) plus an *IR optimization function* that it will apply to each Module that do) plus an *IR optimization function* that it will apply to each Module that
is added via addModuleSet: is added via addModuleSet:
.. code-block: c++ .. code-block:: c++
class KaleidoscopeJIT { class KaleidoscopeJIT {
private: private:
@ -87,7 +87,7 @@ below (standard practice for layers), and we initialize the OptimizeFunction
using a lambda. In the lambda, we just call out to the "optimizeModule" function using a lambda. In the lambda, we just call out to the "optimizeModule" function
that we will define below. that we will define below.
.. code-block: .. code-block:: c++
// ... // ...
auto Resolver = createLambdaResolver( auto Resolver = createLambdaResolver(
@ -117,7 +117,7 @@ OptimizeLayer in our key methods: addModule, findSymbol, and removeModule. In
addModule we need to be careful to replace both references: the findSymbol call addModule we need to be careful to replace both references: the findSymbol call
inside our resolver, and the call through to addModuleSet. inside our resolver, and the call through to addModuleSet.
.. code-block: c++ .. code-block:: c++
std::unique_ptr<Module> optimizeModule(std::unique_ptr<Module> M) { std::unique_ptr<Module> optimizeModule(std::unique_ptr<Module> M) {
// Create a function pass manager. // Create a function pass manager.
@ -154,7 +154,7 @@ IRTransformLayer, but it gives us an opportunity to see how layers compose, and
how one can be implemented, because IRTransformLayer turns out to be one of how one can be implemented, because IRTransformLayer turns out to be one of
the simplest implementations of the *layer* concept that can be devised: the simplest implementations of the *layer* concept that can be devised:
.. code-block: .. code-block:: c++
template <typename BaseLayerT, typename TransformFtor> template <typename BaseLayerT, typename TransformFtor>
class IRTransformLayer { class IRTransformLayer {