I found myself with a fairly large number of useful functions and constants written in LLVM IR. I can use this pseudo library by combining it with a manual IR interface, provided that the specified manual IR starts with a potentially long list of announcements. I know that IR is not necessarily intended as a general-purpose programming language to write material.
This is very similar to writing multiple C functions to a single file, and then reusing them wherever they are used. In C, this works using #include and header files. It's not perfect, but it beats repetition of prototypes.
What is the least unpleasant way to achieve something similar in IR? This is only necessary in order to type material again and again (which I am doing now in copy and paste mode) and use cat as a step of custom assembly.
Thank!
source
share