[examples] Rename LLJITWithJITLink to LLJITWithCustomObjectLinkingLayer.
authorLang Hames <lhames@gmail.com>
Mon, 16 Dec 2019 04:30:01 +0000 (20:30 -0800)
committerLang Hames <lhames@gmail.com>
Mon, 16 Dec 2019 05:57:11 +0000 (21:57 -0800)
LLJIT now uses JITLink/ObjectLinkingLayer by default where available, so
these steps aren't required to use it. The tutorial is still useful though:
Clients can use it to test altervative linking layer implementations (e.g.
handing off to the system linker) or to test implementations of JITLink that
are still under development.

llvm/examples/LLJITExamples/CMakeLists.txt
llvm/examples/LLJITExamples/LLJITWithCustomObjectLinkingLayer/CMakeLists.txt [new file with mode: 0644]
llvm/examples/LLJITExamples/LLJITWithCustomObjectLinkingLayer/LLJITWithCustomObjectLinkingLayer.cpp [moved from llvm/examples/LLJITExamples/LLJITWithJITLink/LLJITWithJITLink.cpp with 85% similarity]
llvm/examples/LLJITExamples/LLJITWithJITLink/CMakeLists.txt [deleted file]

index 2ae0a5a..3aaaa2c 100644 (file)
@@ -1,3 +1,3 @@
 add_subdirectory(LLJITDumpObjects)
 add_subdirectory(LLJITWithObjectCache)
-add_subdirectory(LLJITWithJITLink)
+add_subdirectory(LLJITWithCustomObjectLinkingLayer)
diff --git a/llvm/examples/LLJITExamples/LLJITWithCustomObjectLinkingLayer/CMakeLists.txt b/llvm/examples/LLJITExamples/LLJITWithCustomObjectLinkingLayer/CMakeLists.txt
new file mode 100644 (file)
index 0000000..2277a8e
--- /dev/null
@@ -0,0 +1,11 @@
+set(LLVM_LINK_COMPONENTS
+  Core
+  IRReader
+  OrcJIT
+  Support
+  nativecodegen
+  )
+
+add_llvm_example(LLJITWithCustomObjectLinkingLayer
+  LLJITWithCustomObjectLinkingLayer.cpp
+  )
@@ -1,4 +1,4 @@
-//===-- LLJITWithJITLink.cpp - Configure LLJIT to use ObjectLinkingLayer --===//
+//===--------------- LLJITWithCustomObjectLinkingLayer.cpp ----------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -6,10 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file shows how to switch LLJIT to use ObjectLinkingLayer (which is
-// backed by JITLink) rather than RTDyldObjectLinkingLayer (which is backed by
-// RuntimeDyld). Using JITLink as the underlying allocator enables use of
-// small code model in JIT'd code.
+// This file shows how to switch LLJIT to use a custom object linking layer (we
+// use ObjectLinkingLayer, which is backed by JITLink, as an example).
 //
 //===----------------------------------------------------------------------===//
 
diff --git a/llvm/examples/LLJITExamples/LLJITWithJITLink/CMakeLists.txt b/llvm/examples/LLJITExamples/LLJITWithJITLink/CMakeLists.txt
deleted file mode 100644 (file)
index 5f9bf39..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-set(LLVM_LINK_COMPONENTS
-  Core
-  IRReader
-  OrcJIT
-  Support
-  nativecodegen
-  )
-
-add_llvm_example(LLJITWithJITLink
-  LLJITWithJITLink.cpp
-  )