ir: keep loc when copying.

This commit is contained in:
whitequark 2015-12-25 14:59:28 +08:00
parent 690b2fd034
commit 33c3b3377e
1 changed files with 1 additions and 0 deletions

View File

@ -167,6 +167,7 @@ class Instruction(User):
self_copy = self.__class__.__new__(self.__class__)
Instruction.__init__(self_copy, list(map(mapper, self.operands)),
self.type, self.name)
self_copy.loc = self.loc
return self_copy
def set_basic_block(self, new_basic_block):