Add CMake build support for Orc examples (& fix some clang -Werror build
authorDavid Blaikie <dblaikie@gmail.com>
Sun, 8 Feb 2015 07:20:04 +0000 (07:20 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Sun, 8 Feb 2015 07:20:04 +0000 (07:20 +0000)
breaks due to unused variables).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228520 91177308-0d34-0410-b5e6-96231b3b80d8

examples/Kaleidoscope/CMakeLists.txt
examples/Kaleidoscope/Orc/CMakeLists.txt [new file with mode: 0644]
examples/Kaleidoscope/Orc/initial/CMakeLists.txt [new file with mode: 0644]
examples/Kaleidoscope/Orc/initial/toy.cpp
examples/Kaleidoscope/Orc/lazy_codegen/CMakeLists.txt [new file with mode: 0644]
examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp
examples/Kaleidoscope/Orc/lazy_irgen/CMakeLists.txt [new file with mode: 0644]
examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp

index b93cc76..32664aa 100644 (file)
@@ -13,3 +13,4 @@ add_subdirectory(Chapter5)
 add_subdirectory(Chapter6)
 add_subdirectory(Chapter7)
 add_subdirectory(Chapter8)
+add_subdirectory(Orc)
diff --git a/examples/Kaleidoscope/Orc/CMakeLists.txt b/examples/Kaleidoscope/Orc/CMakeLists.txt
new file mode 100644 (file)
index 0000000..e4cf0c2
--- /dev/null
@@ -0,0 +1,3 @@
+add_subdirectory(initial)
+add_subdirectory(lazy_codegen)
+add_subdirectory(lazy_irgen)
diff --git a/examples/Kaleidoscope/Orc/initial/CMakeLists.txt b/examples/Kaleidoscope/Orc/initial/CMakeLists.txt
new file mode 100644 (file)
index 0000000..acb2d83
--- /dev/null
@@ -0,0 +1,11 @@
+set(LLVM_LINK_COMPONENTS
+  Core
+  ExecutionEngine
+  MCJIT
+  Support
+  native
+  )
+
+add_kaleidoscope_chapter(Kaleidoscope-Orc-initial
+  toy.cpp
+  )
index ce9fc7f..d068394 100644 (file)
@@ -1,3 +1,4 @@
+
 #include "llvm/Analysis/Passes.h"
 #include "llvm/ExecutionEngine/Orc/CompileUtils.h"
 #include "llvm/ExecutionEngine/Orc/IRCompileLayer.h"
@@ -1294,7 +1295,6 @@ int main() {
   InitializeNativeTarget();
   InitializeNativeTargetAsmPrinter();
   InitializeNativeTargetAsmParser();
-  LLVMContext &Context = getGlobalContext();
 
   // Install standard binary operators.
   // 1 is lowest precedence.
diff --git a/examples/Kaleidoscope/Orc/lazy_codegen/CMakeLists.txt b/examples/Kaleidoscope/Orc/lazy_codegen/CMakeLists.txt
new file mode 100644 (file)
index 0000000..3d450e0
--- /dev/null
@@ -0,0 +1,11 @@
+set(LLVM_LINK_COMPONENTS
+  Core
+  ExecutionEngine
+  MCJIT
+  Support
+  native
+  )
+
+add_kaleidoscope_chapter(Kaleidoscope-Orc-lazy_codegen
+  toy.cpp
+  )
index 9ba8899..47cb71b 100644 (file)
@@ -1297,7 +1297,6 @@ int main() {
   InitializeNativeTarget();
   InitializeNativeTargetAsmPrinter();
   InitializeNativeTargetAsmParser();
-  LLVMContext &Context = getGlobalContext();
 
   // Install standard binary operators.
   // 1 is lowest precedence.
diff --git a/examples/Kaleidoscope/Orc/lazy_irgen/CMakeLists.txt b/examples/Kaleidoscope/Orc/lazy_irgen/CMakeLists.txt
new file mode 100644 (file)
index 0000000..29f4fe0
--- /dev/null
@@ -0,0 +1,11 @@
+set(LLVM_LINK_COMPONENTS
+  Core
+  ExecutionEngine
+  MCJIT
+  Support
+  native
+  )
+
+add_kaleidoscope_chapter(Kaleidoscope-Orc-lazy_irgen
+  toy.cpp
+  )
index baafae2..51a7dc8 100644 (file)
@@ -1316,7 +1316,6 @@ int main() {
   InitializeNativeTarget();
   InitializeNativeTargetAsmPrinter();
   InitializeNativeTargetAsmParser();
-  LLVMContext &Context = getGlobalContext();
 
   // Install standard binary operators.
   // 1 is lowest precedence.