raulraja
10/07/2022, 2:44 PMIrElement.deepCopyWithSymbol I can properly clone the entire tree I need but this tree comes with proper offsets that I need to reset to UNDEFINED_OFFSET . I tried recursively walking the tree and mutating it but offsets are declared as a val and passed as arguments to most methods in irFactory .
Is there a way to change the offsets of an existing IR Tree?
Is there a way to clone a tree without the offsets?
Thanks!Ilmir Usmanov [JB]
10/10/2022, 8:18 AMdeepCopyWithSymbols accepts createCopier as the last parameter. By default, it creates DeepCopyIrTreeWithSymbols, but in your case, you should implement your own copier, which will be similar to DeepCopyIrTreeWithSymbols, but resetting offsets.raulraja
10/10/2022, 8:23 AM