0

I have linked LLVM to my C++ project as a library and I need to compile some other C++ code. Is there a LLVM function I can call to do this? Or do I have to modify the LLVM source code?

Howard
  • 21
  • 3
  • 4
    Highly related, if not a dupe: https://stackoverflow.com/questions/10564670/is-there-any-way-to-compile-additional-code-at-runtime-in-c-or-c – πάντα ῥεῖ Jul 26 '22 at 19:51
  • 2
    libllvm actually doesn't know how to compile C++. It's a backend. libclang provides the front end. You probably need to add a lot of custom coding on top of that. Perhaps just run (system, fork+exec, CreateProcess, whatever) a C++ compiler instead. – n. m. could be an AI Jul 26 '22 at 20:29

0 Answers0