Skip to content

Commit 182e79d

Browse files
author
kr-2003
committed
testing
1 parent 24192ce commit 182e79d

File tree

2 files changed

+12
-22
lines changed

2 files changed

+12
-22
lines changed

clang/unittests/Interpreter/CMakeLists.txt

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,16 @@ add_distinct_clang_unittest(ClangReplInterpreterTests
2222
Core
2323
MC
2424
OrcJIT
25-
OrcShared
26-
OrcTargetProcess
27-
ExecutionEngine
28-
RuntimeDyld
2925
Support
3026
TargetParser
31-
Object
3227
)
3328

34-
add_dependencies(ClangReplInterpreterTests
35-
llvm-jitlink-executor
36-
compiler-rt
37-
)
29+
if(TARGET llvm-jitlink-executor AND TARGET compiler-rt)
30+
add_dependencies(ClangReplInterpreterTests
31+
llvm-jitlink-executor
32+
compiler-rt
33+
)
34+
endif()
3835

3936
# Exceptions on Windows are not yet supported.
4037
if(NOT WIN32)

clang/unittests/Interpreter/InterpreterTest.cpp

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ int Global = 42;
3939
REPL_EXTERNAL_VISIBILITY int getGlobal() { return Global; }
4040
REPL_EXTERNAL_VISIBILITY void setGlobal(int val) { Global = val; }
4141

42+
#ifdef _WIN32
43+
#define STDIN_FILENO 0
44+
#define STDOUT_FILENO 1
45+
#define STDERR_FILENO 2
46+
#endif
47+
4248
namespace {
4349

4450
class InterpreterTest : public InterpreterTestBase {
@@ -113,22 +119,9 @@ createInterpreterWithRemoteExecution(const Args &ExtraArgs = {},
113119

114120
llvm::Triple SystemTriple(llvm::sys::getProcessTriple());
115121

116-
std::cout << "System Triple: " << SystemTriple.getTriple() << "\n";
117-
118122
if ((SystemTriple.isOSBinFormatELF() || SystemTriple.isOSBinFormatMachO())) {
119123
std::string OOPExecutor = getExecutorPath();
120-
if (!llvm::sys::fs::exists(OOPExecutor)) {
121-
std::cout << "Executor path does not exist: " << OOPExecutor << std::endl;
122-
return nullptr;
123-
}
124-
125124
std::string OrcRuntimePath = getOrcRuntimePath();
126-
127-
if (!llvm::sys::fs::exists(OrcRuntimePath)) {
128-
std::cout << "ORC runtime path does not exist: " << OrcRuntimePath
129-
<< std::endl;
130-
}
131-
132125
bool UseSharedMemory = false;
133126
std::string SlabAllocateSizeString = "";
134127
std::unique_ptr<llvm::orc::ExecutorProcessControl> EPC;

0 commit comments

Comments
 (0)