@@ -214,7 +214,7 @@ static llvm::ExitOnError ExitOnError;
214214namespace compat {
215215
216216inline std::unique_ptr<clang::Interpreter>
217- createClangInterpreter (std::vector<const char *>& args, bool is_out_of_process ) {
217+ createClangInterpreter (std::vector<const char *>& args, bool outOfProcess ) {
218218 auto has_arg = [](const char * x, llvm::StringRef match = " cuda" ) {
219219 llvm::StringRef Arg = x;
220220 Arg = Arg.trim ().ltrim (' -' );
@@ -255,7 +255,7 @@ createClangInterpreter(std::vector<const char*>& args, bool is_out_of_process) {
255255
256256 std::unique_ptr<llvm::orc::LLJITBuilder> JB;
257257
258- if (is_out_of_process ) {
258+ if (outOfProcess ) {
259259 std::string OOPExecutor = " /Users/abhinavkumar/Desktop/Coding/CERN_HSF_COMPILER_RESEARCH/llvm-project-test/build/bin/llvm-jitlink-executor" ;
260260 bool UseSharedMemory = false ;
261261 std::string SlabAllocateSizeString = " " ;
@@ -283,24 +283,7 @@ createClangInterpreter(std::vector<const char*>& args, bool is_out_of_process) {
283283 " Failed to build Interpreter:" );
284284 return nullptr ;
285285 }
286- // auto interpreter = std::move(*innerOrErr);
287-
288- // // Add your hardcoded static library
289- // auto JOrErr = interpreter->getExecutionEngine();
290- // if (!JOrErr) {
291- // llvm::logAllUnhandledErrors(JOrErr.takeError(), llvm::errs(),
292- // "Failed to get execution engine:");
293- // return nullptr;
294- // }
295- // auto& J = *JOrErr;
296- // std::string libpath = "/Users/abhinavkumar/Desktop/Coding/CERN_HSF_COMPILER_RESEARCH/llvm-project-test/build/lib/libclangInterpreter.a";
297- // auto generator = ExitOnError(
298- // llvm::orc::StaticLibraryDefinitionGenerator::Load(
299- // J.getObjLinkingLayer(),
300- // libpath.c_str()
301- // )
302- // );
303- // J.getMainJITDylib().addGenerator(std::move(generator));
286+
304287 if (CudaEnabled) {
305288 if (auto Err = (*innerOrErr)->LoadDynamicLibrary (" libcudart.so" )) {
306289 llvm::logAllUnhandledErrors (std::move (Err), llvm::errs (),
@@ -310,7 +293,6 @@ createClangInterpreter(std::vector<const char*>& args, bool is_out_of_process) {
310293 }
311294
312295 return std::move (*innerOrErr);
313- // return interpreter;
314296}
315297
316298inline void maybeMangleDeclName (const clang::GlobalDecl& GD,
0 commit comments