Calling Clang’s Assembler from C++

LLVM is a collection of modular and reusable compiler and toolchain technologies. It provides a set of libraries and tools for building compilers, assemblers, linkers, and other related tools. In a project I was working on, we were using the clang part of this project to compile C and LLVM IR code. The code path for these two sources was similar enough that we could have a single compile function…