문제

I am new to LLVM IR, I have a LLVM IR source code and it uses some extern declare functions. These functions are implemented in a C++ file.

So my question is :

How to call these c++ function in the LLVM IR?

Is it right way to compile the c++ file into LLVM IR, and link them together?

도움이 되었습니까?

해결책

Assuming the llvm IR declarations are ABI compatible with your C++ compiler you should be able to compile the C++ to a native object file, compile the LLVM IR to a native object file, and link them using the native linker

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top