Skip to content

Conversation

kr-2003
Copy link
Owner

@kr-2003 kr-2003 commented Jun 13, 2025

Description

Please include a summary of changes, motivation and context for this PR.

Fixes # (issue)

Type of change

Please tick all options which are relevant.

  • Bug fix
  • New feature
  • Requires documentation updates

Testing

Please describe the test(s) that you added and ran to verify your changes.

Checklist

  • I have read the contribution guide recently

github-actions[bot]

This comment was marked as spam.

github-actions[bot]

This comment was marked as off-topic.

std::string ResourceDir = MakeResourcesPath();
std::vector<const char*> ClingArgv = {"-resource-dir", ResourceDir.c_str(),
"-std=c++14"};
"-std=c++14", "-gdwarf-4", "-O0"};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be hard coded.

Comment on lines 286 to 303
// auto interpreter = std::move(*innerOrErr);

// // Add your hardcoded static library
// auto JOrErr = interpreter->getExecutionEngine();
// if (!JOrErr) {
// llvm::logAllUnhandledErrors(JOrErr.takeError(), llvm::errs(),
// "Failed to get execution engine:");
// return nullptr;
// }
// auto& J = *JOrErr;
// std::string libpath = "/Users/abhinavkumar/Desktop/Coding/CERN_HSF_COMPILER_RESEARCH/llvm-project-test/build/lib/libclangInterpreter.a";
// auto generator = ExitOnError(
// llvm::orc::StaticLibraryDefinitionGenerator::Load(
// J.getObjLinkingLayer(),
// libpath.c_str()
// )
// );
// J.getMainJITDylib().addGenerator(std::move(generator));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like this should work, I guess. At least it should not give an error at the load stage, if it still cannot resolve the symbols.
Can you give me the error?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, the backtrace, from the source of the error. Whichever function throws it.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like this should work, I guess. At least it should not give an error at the load stage, if it still cannot resolve the symbols. Can you give me the error?

This is the error while running my sample CppInterOp file.
This time I got other symbols as missing. And if run again, then I get that my symbol is not materialized.

╰─❯ ./test
In codeblock 1
in f1 function
>>> f1()
JIT session error: Symbols not found: [ __ZNK5clang4Type14isFloatingTypeEv, __ZN5clang4Sema20CreateBuiltinUnaryOpENS_14SourceLocationENS_17UnaryOperatorKindEPNS_4ExprEb, __ZN5clang8QualType27getSplitUnqualifiedTypeImplES0_, __ZN5clang4Sema23DiagnoseAmbiguousLookupERNS_12LookupResultE, __ZNK5clang7TagType7getDeclEv, __ZN5clang4Sema13ActOnCallExprEPNS_5ScopeEPNS_4ExprENS_14SourceLocationEN4llvm15MutableArrayRefIS4_EES5_S4_, __ZNK5clang4Expr10getExprLocEv, __ZN5clang12LookupResult11deletePathsEPNS_12CXXBasePathsE, __ZNK5clang10ASTContext22getLValueReferenceTypeENS_8QualTypeEb, __ZN5clang4Sema24BuildDeclarationNameExprERKNS_12CXXScopeSpecERNS_12LookupResultEbb, __ZNK5clang4Stmt11getBeginLocEv, __ZNK5clang10ASTContext11getTypeInfoEPKNS_4TypeE, __ZNK5clang10ASTContext13getBitIntTypeEbj, __ZN5clang4Sema16LookupDestructorEPNS_13CXXRecordDeclE, __ZNK5clang10ASTContext24getTrivialTypeSourceInfoENS_8QualTypeENS_14SourceLocationE, __ZNK5clang4Type18getAsCXXRecordDeclEv, __ZNK5clang10ASTContext28getConstantArrayElementCountEPKNS_17ConstantArrayTypeE, __ZN5clang4Sema11BuildCXXNewENS_11SourceRangeEbNS_14SourceLocationEN4llvm15MutableArrayRefIPNS_4ExprEEES2_S1_NS_8QualTypeEPNS_14TypeSourceInfoENSt3__18optionalIS6_EES1_S6_, __ZN5clang12LookupResult9configureEv, __ZN5clang8QualType16getDesugaredTypeES0_RKNS_10ASTContextE, __ZNK5clang4Stmt14getSourceRangeEv, __ZN5clang4Sema19BuildCStyleCastExprENS_14SourceLocationEPNS_14TypeSourceInfoES1_PNS_4ExprE, __ZN5clang8UsedAttr14CreateImplicitERNS_10ASTContextENS_11SourceRangeENS0_8SpellingE, __ZN5clang4Sema19LookupQualifiedNameERNS_12LookupResultEPNS_11DeclContextEb, __ZN5clang18DeclarationNameLocC1ENS_15DeclarationNameE, __ZN5clang4Sema17CheckLookupAccessERKNS_12LookupResultE, __ZNK5clang12LookupResult21checkDebugAssumptionsEv, __ZNK5clang4Stmt9getEndLocEv, __ZN5clang4Sema19ActOnFinishFullExprEPNS_4ExprENS_14SourceLocationEbbb, __ZN5clang4Decl7addAttrEPNS_4AttrE, __ZN5clang13CodeGenerator14GetMangledNameENS_10GlobalDeclE ]
Failed to execute via ::process:dlupdate failed
>>> f1()
JIT session error: Failed to materialize symbols: { (main, { ___clang_Interpreter_SetValueNoAlloc }) }
Failed to execute via ::process:dlupdate failed
>>> f1()
JIT session error: Failed to materialize symbols: { (main, { ___clang_Interpreter_SetValueNoAlloc }) }
Failed to execute via ::process:dlupdate failed
>>> f1()
JIT session error: Failed to materialize symbols: { (main, { ___clang_Interpreter_SetValueNoAlloc }) }

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, the backtrace, from the source of the error. Whichever function throws it.

Process 8952 launched: '/Users/abhinavkumar/Desktop/Coding/CERN_HSF_COMPILER_RESEARCH/CppInterOp/build/test' (arm64)
In codeblock 1
in f1 function
>>> f1()
Process 8952 stopped
* thread #3, stop reason = breakpoint 1.1
    frame #0: 0x000000010af43994 libclangCppInterOp.dylib`llvm::orc::ExecutionSession::logErrorsToStdErr(llvm::Error) [inlined] llvm::Error::getPtr(this=0x000000016ff12d60) const at Error.h:282:12 [opt]
   279               reinterpret_cast<uintptr_t>(Payload) &
   280               ~static_cast<uintptr_t>(0x1));
   281  #else
-> 282      return Payload;
   283  #endif
   284    }
   285 
warning: libclangCppInterOp.dylib was compiled with optimization - stepping may behave oddly; variables may not be available.
(lldb) bt
* thread #3, stop reason = breakpoint 1.1
  * frame #0: 0x000000010af43994 libclangCppInterOp.dylib`llvm::orc::ExecutionSession::logErrorsToStdErr(llvm::Error) [inlined] llvm::Error::getPtr(this=0x000000016ff12d60) const at Error.h:282:12 [opt]
    frame #1: 0x000000010af43994 libclangCppInterOp.dylib`llvm::orc::ExecutionSession::logErrorsToStdErr(llvm::Error) [inlined] llvm::Error::operator=(this=0x000000016ff12d18, Other=0x000000016ff12d60) at Error.h:219:18 [opt]
    frame #2: 0x000000010af43994 libclangCppInterOp.dylib`llvm::orc::ExecutionSession::logErrorsToStdErr(llvm::Error) [inlined] llvm::Error::Error(this=0x000000016ff12d18, Other=0x000000016ff12d60) at Error.h:199:11 [opt]
    frame #3: 0x000000010af43994 libclangCppInterOp.dylib`llvm::orc::ExecutionSession::logErrorsToStdErr(llvm::Error) [inlined] llvm::Error::Error(this=0x000000016ff12d18, Other=0x000000016ff12d60) at Error.h:197:24 [opt]
    frame #4: 0x000000010af43994 libclangCppInterOp.dylib`llvm::orc::ExecutionSession::logErrorsToStdErr(Err=(Payload = 0x0000000158e4e5b0)) at Core.h:1691:27 [opt]
    frame #5: 0x000000010af60ea8 libclangCppInterOp.dylib`void llvm::detail::UniqueFunctionBase<void, llvm::Error>::CallImpl<void (*)(llvm::Error)>(CallableAddr=<unavailable>, Params=<unavailable>) at FunctionExtras.h:222:12 [opt]
    frame #6: 0x000000010afbb11c libclangCppInterOp.dylib`llvm::orc::LinkGraphLinkingLayer::JITLinkCtx::notifyFailed(llvm::Error) [inlined] llvm::unique_function<void (llvm::Error)>::operator()(this=<unavailable>, Params=(Payload = 0x0000000000000000)) at FunctionExtras.h:387:12 [opt]
    frame #7: 0x000000010afbb100 libclangCppInterOp.dylib`llvm::orc::LinkGraphLinkingLayer::JITLinkCtx::notifyFailed(llvm::Error) [inlined] llvm::orc::ExecutionSession::reportError(this=<unavailable>, Err=(Payload = 0x0000000000000000)) at Core.h:1480:33 [opt]
    frame #8: 0x000000010afbb0fc libclangCppInterOp.dylib`llvm::orc::LinkGraphLinkingLayer::JITLinkCtx::notifyFailed(this=0x0000000158ed5220, Err=(Payload = 0x0000000000000000)) at LinkGraphLinkingLayer.cpp:77:33 [opt]
    frame #9: 0x000000010b5a8bd0 libclangCppInterOp.dylib`void llvm::detail::UniqueFunctionBase<void, llvm::Error>::CallImpl<llvm::jitlink::JITLinkerBase::abandonAllocAndBailOut(std::__1::unique_ptr<llvm::jitlink::JITLinkerBase, std::__1::default_delete<llvm::jitlink::JITLinkerBase>>, llvm::Error)::$_0>(void*, llvm::Error&) [inlined] llvm::jitlink::JITLinkerBase::abandonAllocAndBailOut(std::__1::unique_ptr<llvm::jitlink::JITLinkerBase, std::__1::default_delete<llvm::jitlink::JITLinkerBase>>, llvm::Error)::$_0::operator()(this=<unavailable>, E2=(Payload = 0x0000000000000000)) at JITLinkGeneric.cpp:274:13 [opt]
    frame #10: 0x000000010b5a8b74 libclangCppInterOp.dylib`void llvm::detail::UniqueFunctionBase<void, llvm::Error>::CallImpl<llvm::jitlink::JITLinkerBase::abandonAllocAndBailOut(std::__1::unique_ptr<llvm::jitlink::JITLinkerBase, std::__1::default_delete<llvm::jitlink::JITLinkerBase>>, llvm::Error)::$_0>(CallableAddr=<unavailable>, Params=<unavailable>) at FunctionExtras.h:222:12 [opt]
    frame #11: 0x000000010af7d25c libclangCppInterOp.dylib`llvm::orc::EPCGenericJITLinkMemoryManager::InFlightAlloc::abandon(llvm::unique_function<void (llvm::Error)>)::'lambda'(llvm::Error, llvm::Error)::operator()(llvm::Error, llvm::Error) [inlined] llvm::unique_function<void (llvm::Error)>::operator()(this=<unavailable>, Params=(Payload = 0x0000000000000000)) at FunctionExtras.h:387:12 [opt]
    frame #12: 0x000000010af7d23c libclangCppInterOp.dylib`llvm::orc::EPCGenericJITLinkMemoryManager::InFlightAlloc::abandon(this=0x0000000158fc4668, SerializationErr=(Payload = 0x0000000000000000), DeallocateErr=<unavailable>)>)::'lambda'(llvm::Error, llvm::Error)::operator()(llvm::Error, llvm::Error) at EPCGenericJITLinkMemoryManager.cpp:87:13 [opt]
    frame #13: 0x000000010af7decc libclangCppInterOp.dylib`void llvm::orc::shared::WrapperFunction<llvm::orc::shared::SPSError (llvm::orc::shared::SPSExecutorAddr, llvm::orc::shared::SPSSequence<llvm::orc::shared::SPSExecutorAddr>)>::callAsync<void llvm::orc::ExecutorProcessControl::callSPSWrapperAsync<llvm::orc::shared::SPSError (this=0x0000000158fc4668, R=WrapperFunctionResult @ 0x000000016ff12f60), llvm::orc::ExecutorProcessControl::RunAsTask, llvm::orc::EPCGenericJITLinkMemoryManager::InFlightAlloc::abandon(llvm::unique_function<void (llvm::Error)>)::'lambda'(llvm::Error, llvm::Error), llvm::orc::ExecutorAddr, llvm::ArrayRef<llvm::orc::ExecutorAddr>>(llvm::orc::ExecutorProcessControl::RunAsTask&&, llvm::orc::ExecutorAddr, llvm::orc::EPCGenericJITLinkMemoryManager::InFlightAlloc::abandon(llvm::unique_function<void (llvm::Error)>)::'lambda'(llvm::Error, llvm::Error)&&, llvm::orc::ExecutorAddr const&, llvm::ArrayRef<llvm::orc::ExecutorAddr> const&)::'lambda'(auto&&, char const*, unsigned long), llvm::orc::EPCGenericJITLinkMemoryManager::InFlightAlloc::abandon(llvm::unique_function<void (llvm::Error)>)::'lambda'(llvm::Error, llvm::Error), llvm::orc::ExecutorAddr, llvm::ArrayRef<llvm::orc::ExecutorAddr>>(auto&&, llvm::orc::ExecutorProcessControl::RunAsTask&&, llvm::orc::ExecutorAddr const&, llvm::ArrayRef<llvm::orc::ExecutorAddr> const&)::'lambda'(llvm::orc::shared::WrapperFunctionResult)::operator()(llvm::orc::shared::WrapperFunctionResult) at WrapperFunctionUtils.h:511:7 [opt]
    frame #14: 0x000000010af7dce4 libclangCppInterOp.dylib`llvm::orc::GenericNamedTaskImpl<llvm::orc::ExecutorProcessControl::IncomingWFRHandler llvm::orc::ExecutorProcessControl::RunAsTask::operator()<void llvm::orc::shared::WrapperFunction<llvm::orc::shared::SPSError (llvm::orc::shared::SPSExecutorAddr, llvm::orc::shared::SPSSequence<llvm::orc::shared::SPSExecutorAddr>)>::callAsync<void llvm::orc::ExecutorProcessControl::callSPSWrapperAsync<llvm::orc::shared::SPSError (llvm::orc::shared::SPSExecutorAddr, llvm::orc::shared::SPSSequence<llvm::orc::shared::SPSExecutorAddr>), llvm::orc::ExecutorProcessControl::RunAsTask, llvm::orc::EPCGenericJITLinkMemoryManager::InFlightAlloc::abandon(llvm::unique_function<void (llvm::Error)>)::'lambda'(llvm::Error, llvm::Error), llvm::orc::ExecutorAddr, llvm::ArrayRef<llvm::orc::ExecutorAddr>>(llvm::orc::ExecutorProcessControl::RunAsTask&&, llvm::orc::ExecutorAddr, llvm::orc::EPCGenericJITLinkMemoryManager::InFlightAlloc::abandon(llvm::unique_function<void (llvm::Error)>)::'lambda'(llvm::Error, llvm::Error)&&, llvm::orc::ExecutorAddr const&, llvm::ArrayRef<llvm::orc::ExecutorAddr> const&)::'lambda'(auto&&, char const*, unsigned long), llvm::orc::EPCGenericJITLinkMemoryManager::InFlightAlloc::abandon(llvm::unique_function<void (llvm::Error)>)::'lambda'(llvm::Error, llvm::Error), llvm::orc::ExecutorAddr, llvm::ArrayRef<llvm::orc::ExecutorAddr>>(auto&&, llvm::orc::ExecutorProcessControl::RunAsTask&&, llvm::orc::ExecutorAddr const&, llvm::ArrayRef<llvm::orc::ExecutorAddr> const&)::'lambda'(llvm::orc::shared::WrapperFunctionResult)>(auto&&)::'lambda'(llvm::orc::shared::WrapperFunctionResult)::operator()(llvm::orc::shared::WrapperFunctionResult)::'lambda'()>::run() [inlined] llvm::orc::ExecutorProcessControl::IncomingWFRHandler llvm::orc::ExecutorProcessControl::RunAsTask::operator(this=<unavailable>)<void llvm::orc::shared::WrapperFunction<llvm::orc::shared::SPSError (llvm::orc::shared::SPSExecutorAddr, llvm::orc::shared::SPSSequence<llvm::orc::shared::SPSExecutorAddr>)>::callAsync<void llvm::orc::ExecutorProcessControl::callSPSWrapperAsync<llvm::orc::shared::SPSError (llvm::orc::shared::SPSExecutorAddr, llvm::orc::shared::SPSSequence<llvm::orc::shared::SPSExecutorAddr>), llvm::orc::ExecutorProcessControl::RunAsTask, llvm::orc::EPCGenericJITLinkMemoryManager::InFlightAlloc::abandon(llvm::unique_function<void (llvm::Error)>)::'lambda'(llvm::Error, llvm::Error), llvm::orc::ExecutorAddr, llvm::ArrayRef<llvm::orc::ExecutorAddr>>(llvm::orc::ExecutorProcessControl::RunAsTask&&, llvm::orc::ExecutorAddr, llvm::orc::EPCGenericJITLinkMemoryManager::InFlightAlloc::abandon(llvm::unique_function<void (llvm::Error)>)::'lambda'(llvm::Error, llvm::Error)&&, llvm::orc::ExecutorAddr const&, llvm::ArrayRef<llvm::orc::ExecutorAddr> const&)::'lambda'(auto&&, char const*, unsigned long), llvm::orc::EPCGenericJITLinkMemoryManager::InFlightAlloc::abandon(llvm::unique_function<void (llvm::Error)>)::'lambda'(llvm::Error, llvm::Error), llvm::orc::ExecutorAddr, llvm::ArrayRef<llvm::orc::ExecutorAddr>>(auto&&, llvm::orc::ExecutorProcessControl::RunAsTask&&, llvm::orc::ExecutorAddr const&, llvm::ArrayRef<llvm::orc::ExecutorAddr> const&)::'lambda'(llvm::orc::shared::WrapperFunctionResult)>(auto&&)::'lambda'(llvm::orc::shared::WrapperFunctionResult)::operator()(llvm::orc::shared::WrapperFunctionResult)::'lambda'()::operator()() at ExecutorProcessControl.h:93:23 [opt]
    frame #15: 0x000000010af7dccc libclangCppInterOp.dylib`llvm::orc::GenericNamedTaskImpl<llvm::orc::ExecutorProcessControl::IncomingWFRHandler llvm::orc::ExecutorProcessControl::RunAsTask::operator()<void llvm::orc::shared::WrapperFunction<llvm::orc::shared::SPSError (llvm::orc::shared::SPSExecutorAddr, llvm::orc::shared::SPSSequence<llvm::orc::shared::SPSExecutorAddr>)>::callAsync<void llvm::orc::ExecutorProcessControl::callSPSWrapperAsync<llvm::orc::shared::SPSError (llvm::orc::shared::SPSExecutorAddr, llvm::orc::shared::SPSSequence<llvm::orc::shared::SPSExecutorAddr>), llvm::orc::ExecutorProcessControl::RunAsTask, llvm::orc::EPCGenericJITLinkMemoryManager::InFlightAlloc::abandon(llvm::unique_function<void (llvm::Error)>)::'lambda'(llvm::Error, llvm::Error), llvm::orc::ExecutorAddr, llvm::ArrayRef<llvm::orc::ExecutorAddr>>(llvm::orc::ExecutorProcessControl::RunAsTask&&, llvm::orc::ExecutorAddr, llvm::orc::EPCGenericJITLinkMemoryManager::InFlightAlloc::abandon(llvm::unique_function<void (llvm::Error)>)::'lambda'(llvm::Error, llvm::Error)&&, llvm::orc::ExecutorAddr const&, llvm::ArrayRef<llvm::orc::ExecutorAddr> const&)::'lambda'(auto&&, char const*, unsigned long), llvm::orc::EPCGenericJITLinkMemoryManager::InFlightAlloc::abandon(llvm::unique_function<void (llvm::Error)>)::'lambda'(llvm::Error, llvm::Error), llvm::orc::ExecutorAddr, llvm::ArrayRef<llvm::orc::ExecutorAddr>>(auto&&, llvm::orc::ExecutorProcessControl::RunAsTask&&, llvm::orc::ExecutorAddr const&, llvm::ArrayRef<llvm::orc::ExecutorAddr> const&)::'lambda'(llvm::orc::shared::WrapperFunctionResult)>(auto&&)::'lambda'(llvm::orc::shared::WrapperFunctionResult)::operator()(llvm::orc::shared::WrapperFunctionResult)::'lambda'()>::run(this=<unavailable>) at TaskDispatch.h:69:25 [opt]
    frame #16: 0x000000010b022d4c libclangCppInterOp.dylib`void* std::__1::__thread_proxy[abi:v160006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, llvm::orc::DynamicThreadPoolTaskDispatcher::dispatch(std::__1::unique_ptr<llvm::orc::Task, std::__1::default_delete<llvm::orc::Task>>)::$_0>>(void*) [inlined] llvm::orc::DynamicThreadPoolTaskDispatcher::dispatch(std::__1::unique_ptr<llvm::orc::Task, std::__1::default_delete<llvm::orc::Task>>)::$_0::operator()(this=0x0000000158fc3d78) at TaskDispatch.cpp:71:10 [opt]
    frame #17: 0x000000010b022d24 libclangCppInterOp.dylib`void* std::__1::__thread_proxy[abi:v160006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, llvm::orc::DynamicThreadPoolTaskDispatcher::dispatch(std::__1::unique_ptr<llvm::orc::Task, std::__1::default_delete<llvm::orc::Task>>)::$_0>>(void*) [inlined] decltype(std::declval<llvm::orc::DynamicThreadPoolTaskDispatcher::dispatch(std::__1::unique_ptr<llvm::orc::Task, std::__1::default_delete<llvm::orc::Task>>)::$_0>()()) std::__1::__invoke[abi:v160006]<llvm::orc::DynamicThreadPoolTaskDispatcher::dispatch(std::__1::unique_ptr<llvm::orc::Task, std::__1::default_delete<llvm::orc::Task>>)::$_0>(__f=0x0000000158fc3d78) at invoke.h:394:23 [opt]
    frame #18: 0x000000010b022d24 libclangCppInterOp.dylib`void* std::__1::__thread_proxy[abi:v160006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, llvm::orc::DynamicThreadPoolTaskDispatcher::dispatch(std::__1::unique_ptr<llvm::orc::Task, std::__1::default_delete<llvm::orc::Task>>)::$_0>>(void*) [inlined] void std::__1::__thread_execute[abi:v160006]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, llvm::orc::DynamicThreadPoolTaskDispatcher::dispatch(std::__1::unique_ptr<llvm::orc::Task, std::__1::default_delete<llvm::orc::Task>>)::$_0>(__t=size=2, (null)=<unavailable>) at thread:282:5 [opt]
    frame #19: 0x000000010b022d24 libclangCppInterOp.dylib`void* std::__1::__thread_proxy[abi:v160006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, llvm::orc::DynamicThreadPoolTaskDispatcher::dispatch(std::__1::unique_ptr<llvm::orc::Task, std::__1::default_delete<llvm::orc::Task>>)::$_0>>(__vp=0x0000000158fc3d70) at thread:293:5 [opt]
    frame #20: 0x00000001965c6c0c libsystem_pthread.dylib`_pthread_start + 136

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This time I got other symbols as missing

Might be possible that we need to load more static libraries.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

std::unique_ptr<llvm::orc::LLJITBuilder> JB;

if(outOfProcess) {
std::string OOPExecutor = std::string(LLVM_SOURCE_DIR) + "/build/bin/llvm-jitlink-executor";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no header providing "std::string" is directly included [misc-include-cleaner]

lib/CppInterOp/Compatibility.h:10:

+ #include <string>

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions


inline std::unique_ptr<clang::Interpreter>
createClangInterpreter(std::vector<const char*>& args) {
createClangInterpreter(std::vector<const char*>& args, bool outOfProcess) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no header providing "std::vector" is directly included [misc-include-cleaner]

lib/CppInterOp/Compatibility.h:10:

+ #include <vector>

@kr-2003 kr-2003 changed the title remote jit execution Adds out-of-process JIT execution in CppInterOp Jun 17, 2025
Copy link

clang-tidy review says "All clean, LGTM! 👍"

Copy link

clang-tidy review says "All clean, LGTM! 👍"

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

///\returns 0 on success, non-zero on failure.
CPPINTEROP_API int Undo(unsigned N = 1);

CPPINTEROP_API pid_t GetExecutorPID();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no header providing "pid_t" is directly included [misc-include-cleaner]

include/CppInterOp/CppInterOp.h:21:

- #include <vector>
+ #include <sys/types.h>
+ #include <vector>

#endif
}

inline pid_t getExecutorPID() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no header providing "pid_t" is directly included [misc-include-cleaner]

lib/CppInterOp/Compatibility.h:10:

+ #include <sched.h>

}

inline pid_t getExecutorPID() {
return getLastLaunchedExecutorPID();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: use of undeclared identifier 'getLastLaunchedExecutorPID' [clang-diagnostic-error]

  return getLastLaunchedExecutorPID();
         ^

#endif
}

pid_t GetExecutorPID() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no header providing "pid_t" is directly included [misc-include-cleaner]

lib/CppInterOp/CppInterOp.cpp:40:

- #if CLANG_VERSION_MAJOR >= 19
+ #include <sys/types.h>
+ #if CLANG_VERSION_MAJOR >= 19

Copy link

clang-tidy review says "All clean, LGTM! 👍"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants