File tree Expand file tree Collapse file tree 1 file changed +13
-21
lines changed Expand file tree Collapse file tree 1 file changed +13
-21
lines changed Original file line number Diff line number Diff line change @@ -110,8 +110,14 @@ getSymbolAddress(const cling::Interpreter& I, llvm::StringRef IRName) {
110
110
111
111
llvm::orc::LLJIT& Jit = *compat::getExecutionEngine (I);
112
112
llvm::orc::SymbolNameVector Names;
113
- Names.push_back (Jit.getExecutionSession ().intern (IRName));
113
+ llvm::orc::ExecutionSession& ES = Jit.getExecutionSession ();
114
+ Names.push_back (ES.intern (IRName));
115
+ #if CLANG_VERSION_MAJOR < 16
114
116
return llvm::make_error<llvm::orc::SymbolsNotFound>(Names);
117
+ #else
118
+ return llvm::make_error<llvm::orc::SymbolsNotFound>(ES.getSymbolStringPool (),
119
+ std::move (Names));
120
+ #endif // CLANG_VERSION_MAJOR
115
121
}
116
122
117
123
inline void codeComplete (std::vector<std::string>& Results,
@@ -399,29 +405,15 @@ inline std::string MakeResourceDir(llvm::StringRef Dir) {
399
405
}
400
406
401
407
// Clang >= 16 (=16 with Value patch) change castAs to converTo
402
- #if CLANG_VERSION_MAJOR >= 16
403
- template <typename T>
404
- inline T convertTo (
405
- #ifdef USE_CLING
406
- cling::Value V
407
- #else
408
- clang::Value V
409
- #endif
410
- ) {
411
- return V.convertTo <T>();
412
- }
413
- #else
414
- template <typename T>
415
- inline T convertTo (
416
408
#ifdef USE_CLING
417
- cling::Value V
418
- #else
419
- clang::Value V
420
- #endif
421
- ) {
409
+ template <typename T> inline T convertTo (cling::Value V) {
422
410
return V.castAs <T>();
423
411
}
424
- #endif
412
+ #else // CLANG_REPL
413
+ template <typename T> inline T convertTo (clang::Value V) {
414
+ return V.convertTo <T>();
415
+ }
416
+ #endif // USE_CLING
425
417
426
418
} // namespace compat
427
419
You can’t perform that action at this time.
0 commit comments