5
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
6
//
7
7
// ===----------------------------------------------------------------------===//
8
- //
9
- // Unit tests for Clang's Interpreter library.
10
- //
11
- // ===----------------------------------------------------------------------===//
12
8
13
9
#include " InterpreterTestFixture.h"
14
10
18
14
#include " clang/Lex/Preprocessor.h"
19
15
#include " clang/Sema/CodeCompleteConsumer.h"
20
16
#include " clang/Sema/Sema.h"
21
- #include " llvm/ExecutionEngine/Orc/LLJIT.h"
22
17
#include " llvm/LineEditor/LineEditor.h"
23
- #include " llvm/Support/Error.h"
24
18
#include " llvm/Support/raw_ostream.h"
25
19
26
20
#include " gmock/gmock.h"
@@ -32,12 +26,14 @@ auto CB = clang::IncrementalCompilerBuilder();
32
26
33
27
class CodeCompletionTest : public InterpreterTestBase {
34
28
public:
35
- std::unique_ptr<CompilerInstance> CI;
36
29
std::unique_ptr<Interpreter> Interp;
37
30
38
- CodeCompletionTest ()
39
- : CI(cantFail(CB.CreateCpp())),
40
- Interp (cantFail(clang::Interpreter::create(std::move(CI)))) {}
31
+ void SetUp () override {
32
+ if (!HostSupportsJIT ())
33
+ GTEST_SKIP ();
34
+ std::unique_ptr<CompilerInstance> CI = cantFail (CB.CreateCpp ());
35
+ this ->Interp = cantFail (clang::Interpreter::create (std::move (CI)));
36
+ }
41
37
42
38
std::vector<std::string> runComp (llvm::StringRef Input, llvm::Error &ErrR) {
43
39
auto ComplCI = CB.CreateCpp ();
0 commit comments