Adding DebugLoc to machine instructions generated from InlineAsm constants


I'm trying to find the specific place where a MachineInstr is
generated from an InlineAsm IR instruction's constant input argument
because I want to label it with the correct DebugLoc. Currently, the
InlineAsm MachineInstr itself has the correct DebugLoc, but all the
MOVs to registers that are spawned for any (e.g. integer) constant
input arguments do not have DebugLoc associated with them, leading to
misattribution of some source lines.
I can't seem to find the specific place where those instructions are
generated from the IR and I'd appreciate any hints.
I realize this issue might be specific to my custom backend - which is
similar to the x86 backend - but finding the place where this is done
in e.g. x86 could still point me in the right direction. (Same applies
for the ancient llvm version my code is based on (3.5): figuring out
how this works in a newer version would still probably help me.)