From af1256f86cdb3fbae993dd234ec7c3d18a8788c5 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sat, 14 Oct 2023 02:44:09 +0000 Subject: [PATCH] Load the compiler instance plugins. This patch should resolve an issue in xeus-clang-repl with clad. --- include/clang/Interpreter/Compatibility.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/clang/Interpreter/Compatibility.h b/include/clang/Interpreter/Compatibility.h index 6aaf55583..399530227 100644 --- a/include/clang/Interpreter/Compatibility.h +++ b/include/clang/Interpreter/Compatibility.h @@ -70,6 +70,7 @@ namespace compat { #ifdef USE_REPL #include "clang/AST/Mangle.h" +#include "clang/Frontend/CompilerInstance.h" #include "clang/Interpreter/DynamicLibraryManager.h" #include "clang/Interpreter/Interpreter.h" #include "clang/Interpreter/Value.h" @@ -117,6 +118,9 @@ createClangInterpreter(std::vector& args) { #if CLANG_VERSION_MAJOR < 16 auto innerOrErr = clang::Interpreter::create(std::move(*ciOrErr)); #else + (*ciOrErr)->LoadRequestedPlugins(); + if (CudaEnabled) + DeviceCI->LoadRequestedPlugins(); auto innerOrErr = CudaEnabled ? clang::Interpreter::createWithCUDA(std::move(*ciOrErr), std::move(DeviceCI))