From cb2f3d92cae93f295c5cad544eccdad3ff187fac Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 8 Feb 2018 11:05:57 +0200 Subject: Fix bug in operation aliasing logic --- build2/b.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'build2/b.cxx') diff --git a/build2/b.cxx b/build2/b.cxx index 9dc6f43..47cbef2 100644 --- a/build2/b.cxx +++ b/build2/b.cxx @@ -989,12 +989,9 @@ main (int argc, char* argv[]) if (o == 0) o = default_id; - // Before de-aliasing and/or translation (we assume in the check - // below that those will be the same since we've verified the - // meta-operation implementation is the same). + // Save the original oid before de-aliasing. // orig_oid = o; - oif = lookup (o); l5 ([&]{trace << "start operation batch " << oif->name @@ -1009,8 +1006,14 @@ main (int argc, char* argv[]) if (oif->id != oid) { + // Update the original id (we assume in the check below that + // translation would have produced the same result since we've + // verified the meta-operation implementation is the same). + // + orig_oid = oid; oif = lookup (oid); oid = oif->id; // De-alias. + l5 ([&]{trace << "operation translated to " << oif->name << ", id " << static_cast (oid);}); } -- cgit v1.1