[Orc] Run the examples as part of the tests

Enable the Orc C-Bindings for testing.

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D104637
This commit is contained in:
Valentin Churavy 2021-06-30 21:44:54 +02:00
parent 69e0f790e0
commit 9762f12c6c
No known key found for this signature in database
GPG Key ID: 02E09F0CCD46FF9D
6 changed files with 21 additions and 1 deletions

View File

@ -162,6 +162,10 @@ if(LLVM_BUILD_EXAMPLES)
Kaleidoscope-Ch6
Kaleidoscope-Ch7
LLJITWithThinLTOSummaries
OrcV2CBindingsBasicUsage
OrcV2CBindingsAddObjectFile
OrcV2CBindingsRemovableCode
OrcV2CBindingsReflectProcessSymbols
)
if(CMAKE_HOST_UNIX)
list(APPEND LLVM_TEST_DEPENDS

View File

@ -0,0 +1,3 @@
# RUN: OrcV2CBindingsAddObjectFile 2>&1 | FileCheck %s
# CHECK: 1 + 2 = 3

View File

@ -0,0 +1,3 @@
# RUN: OrcV2CBindingsBasicUsage 2>&1 | FileCheck %s
# CHECK: 1 + 2 = 3

View File

@ -0,0 +1,3 @@
# RUN: OrcV2CBindingsReflectProcessSymbols 2>&1 | FileCheck %s
# CHECK: 3 * 4 + 5 = 17

View File

@ -0,0 +1,3 @@
# RUN: OrcV2CBindingsRemovableCode 2>&1 | FileCheck %s
# CHECK: 1 + 2 = 3

View File

@ -182,7 +182,11 @@ tools.extend([
ToolSubst('Kaleidoscope-Ch7', unresolved='ignore'),
ToolSubst('Kaleidoscope-Ch8', unresolved='ignore'),
ToolSubst('LLJITWithThinLTOSummaries', unresolved='ignore'),
ToolSubst('LLJITWithRemoteDebugging', unresolved='ignore')])
ToolSubst('LLJITWithRemoteDebugging', unresolved='ignore'),
ToolSubst('OrcV2CBindingsBasicUsage', unresolved='ignore'),
ToolSubst('OrcV2CBindingsAddObjectFile', unresolved='ignore'),
ToolSubst('OrcV2CBindingsRemovableCode', unresolved='ignore'),
ToolSubst('OrcV2CBindingsReflectProcessSymbols', unresolved='ignore')])
llvm_config.add_tool_substitutions(tools, config.llvm_tools_dir)