[FIRRTL] latestFIRVersion -> exportFIRVersion, NFC

Change the name of the constexpr `latestFIRVersion` to `exportFIRVersion`
as this is not the "latest" version, but the version that is used when
exporting FIRRTL.  This will avoid confusion about what this is.

Make the `exportFIRVersion` the same as the `nextFIRVersion`.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
This commit is contained in:
Schuyler Eldridge 2023-09-27 21:31:22 -04:00
parent d4d71bd4d1
commit 48a2c30c67
No known key found for this signature in database
GPG Key ID: 50C5E9936AAD536D
3 changed files with 3 additions and 3 deletions

View File

@ -107,8 +107,8 @@ struct FIRVersion {
};
constexpr FIRVersion minimumFIRVersion(0, 2, 0);
constexpr FIRVersion latestFIRVersion(3, 3, 0);
constexpr FIRVersion nextFIRVersion(3, 3, 0);
constexpr FIRVersion exportFIRVersion = nextFIRVersion;
constexpr FIRVersion defaultFIRVersion(1, 0, 0);
template <typename T>

View File

@ -20,5 +20,5 @@ MlirLogicalResult mlirExportFIRRTL(MlirModule module,
MlirStringCallback callback,
void *userData) {
mlir::detail::CallbackOstream stream(callback, userData);
return wrap(exportFIRFile(unwrap(module), stream, {}, latestFIRVersion));
return wrap(exportFIRFile(unwrap(module), stream, {}, exportFIRVersion));
}

View File

@ -1398,7 +1398,7 @@ void circt::firrtl::registerToFIRFileTranslation() {
static mlir::TranslateFromMLIRRegistration toFIR(
"export-firrtl", "emit FIRRTL dialect operations to .fir output",
[](ModuleOp module, llvm::raw_ostream &os) {
return exportFIRFile(module, os, targetLineLength, latestFIRVersion);
return exportFIRFile(module, os, targetLineLength, exportFIRVersion);
},
[](mlir::DialectRegistry &registry) {
registry.insert<chirrtl::CHIRRTLDialect>();