Вопрос

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