diff options
author | Florian Hahn <flo@fhahn.com> | 2019-11-12 14:06:12 +0000 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2019-11-12 14:14:48 +0000 |
commit | 7d0b1d77b3d4d47df477519fd1bf099b3df6f899 (patch) | |
tree | ca900ee5b656d7e131ddcb29a2b763ec9fe4dac4 /llvm/CMakeLists.txt | |
parent | a6c40f56aed1556a80867209b6846f7eedc4dc78 (diff) | |
download | bcm5719-llvm-7d0b1d77b3d4d47df477519fd1bf099b3df6f899.tar.gz bcm5719-llvm-7d0b1d77b3d4d47df477519fd1bf099b3df6f899.zip |
[Examples] Add IRTransformations directory to examples.
This patch adds a new IRTransformations directory to llvm/examples/. This is
intended to serve as a new home for example transformations/analysis
code used by various tutorials.
If LLVM_BUILD_EXAMPLES is enabled, the ExamplesIRTransforms library is
linked into the opt binary and the example passes become available.
To start off with, it contains the CFG simplifications used in the IR
part of the 'Getting Started With LLVM: Basics' tutorial at the US LLVM
Developers Meeting 2019.
Reviewers: paquette, jfb, meikeb, lhames, kbarton
Reviewed By: paquette
Differential Revision: https://reviews.llvm.org/D69416
Diffstat (limited to 'llvm/CMakeLists.txt')
-rw-r--r-- | llvm/CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index 29073869989..0aa22c6deb0 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -530,6 +530,10 @@ option(LLVM_BUILD_EXAMPLES "Build the LLVM example programs. If OFF, just generate build targets." OFF) option(LLVM_INCLUDE_EXAMPLES "Generate build targets for the LLVM examples" ON) +if(LLVM_BUILD_EXAMPLES) + add_definitions(-DBUILD_EXAMPLES) +endif(LLVM_BUILD_EXAMPLES) + option(LLVM_BUILD_TESTS "Build LLVM unit tests. If OFF, just generate build targets." OFF) option(LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON) |