From 33c3b3377e70b6852b7142cd55149dcbeb364d4f Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 25 Dec 2015 14:59:28 +0800 Subject: [PATCH] ir: keep loc when copying. --- artiq/compiler/ir.py | 1 + 1 file changed, 1 insertion(+) diff --git a/artiq/compiler/ir.py b/artiq/compiler/ir.py index e1f370ba8..c517787d3 100644 --- a/artiq/compiler/ir.py +++ b/artiq/compiler/ir.py @@ -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):