From cc8d6400f49f541384f51f5a848a992c58041a59 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 13 Mar 2018 17:00:23 -0700 Subject: [PATCH] Rename builder.rs to inst_builder.rs. This reflects its purpose, to define the `InstBuilder` trait. --- lib/cretonne/meta/gen_instr.py | 6 +++--- lib/cretonne/src/ir/builder.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/cretonne/meta/gen_instr.py b/lib/cretonne/meta/gen_instr.py index ab42b01850..38d120fa7e 100644 --- a/lib/cretonne/meta/gen_instr.py +++ b/lib/cretonne/meta/gen_instr.py @@ -687,7 +687,7 @@ def gen_builder(insts, fmt): fmt.doc_comment(""" Convenience methods for building instructions. - The `InstrBuilder` trait has one method per instruction opcode for + The `InstBuilder` trait has one method per instruction opcode for conveniently constructing the instruction with minimum arguments. Polymorphic instructions infer their result types from the input arguments when possible. In some cases, an explicit `ctrl_typevar` @@ -722,7 +722,7 @@ def generate(isas, out_dir): gen_type_constraints(fmt, instrs) fmt.update_file('opcodes.rs', out_dir) - # builder.rs + # inst_builder.rs fmt = srcgen.Formatter() gen_builder(instrs, fmt) - fmt.update_file('builder.rs', out_dir) + fmt.update_file('inst_builder.rs', out_dir) diff --git a/lib/cretonne/src/ir/builder.rs b/lib/cretonne/src/ir/builder.rs index a69fd4e181..7e1480186d 100644 --- a/lib/cretonne/src/ir/builder.rs +++ b/lib/cretonne/src/ir/builder.rs @@ -36,7 +36,7 @@ pub trait InstBuilderBase<'f>: Sized { // // This file defines the `InstBuilder` trait as an extension of `InstBuilderBase` with methods per // instruction format and per opcode. -include!(concat!(env!("OUT_DIR"), "/builder.rs")); +include!(concat!(env!("OUT_DIR"), "/inst_builder.rs")); /// Any type implementing `InstBuilderBase` gets all the `InstBuilder` methods for free. impl<'f, T: InstBuilderBase<'f>> InstBuilder<'f> for T {}