The line you want to add and the line on which the error is reported are not the same - I'm guessing a copy-paste error?
In any case, the first line is illegal, because you're defining a global with a local name (starting with %
instead of @
). The second line is legal by itself but from the error message I'm guessing you tried to write it inside a function, which is not a legal location for a global. Just like globals in C, LLVM globals need to be defined directly in the module scope, outside any function definition.